diff --git a/src/network/network_content.cpp b/src/network/network_content.cpp index 1191ef22a3..dfb2bf6aca 100644 --- a/src/network/network_content.cpp +++ b/src/network/network_content.cpp @@ -173,7 +173,7 @@ bool ClientNetworkContentSocketHandler::Receive_SERVER_INFO(Packet &p) ConstContentVector parents; this->ReverseLookupTreeDependency(parents, ci); for (const ContentInfo *ici : parents) { - this->CheckDependencyState(const_cast(ici)); + this->CheckDependencyState(ici); } this->OnReceiveContentInfo(ci); @@ -973,7 +973,7 @@ void ClientNetworkContentSocketHandler::ReverseLookupTreeDependency(ConstContent * Check the dependencies (recursively) of this content info * @param ci the content info to check the dependencies of */ -void ClientNetworkContentSocketHandler::CheckDependencyState(ContentInfo *ci) +void ClientNetworkContentSocketHandler::CheckDependencyState(const ContentInfo *ci) { if (ci->IsSelected() || ci->state == ContentInfo::ALREADY_HERE) { /* Selection is easy; just walk all children and set the diff --git a/src/network/network_content.h b/src/network/network_content.h index bf62108edf..2a693cc5f1 100644 --- a/src/network/network_content.h +++ b/src/network/network_content.h @@ -130,7 +130,7 @@ public: void ReverseLookupDependency(ConstContentVector &parents, const ContentInfo *child) const; void ReverseLookupTreeDependency(ConstContentVector &tree, const ContentInfo *child) const; - void CheckDependencyState(ContentInfo *ci); + void CheckDependencyState(const ContentInfo *ci); /** Get the number of content items we know locally. */ uint Length() const { return (uint)this->infos.size(); }