1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Fix code mistake

This commit is contained in:
Dydzio 2018-12-31 15:22:45 +01:00
parent 94df657d03
commit 456132c06b

View File

@ -449,7 +449,7 @@ void VCAI::objectRemoved(const CGObjectInstance * obj)
//clear resource manager goal cache - logic copied from ResourceManager::notifyGoalCompleted
while(true)
{ //unfortunately we can't use remove_if on heap
auto queue = ah->resourceManager->queue;
auto & queue = ah->resourceManager->queue;
auto iteratorToRemove = boost::find_if(queue, [&](const ResourceObjective & x) -> bool
{
return checkRemovalValidity(x.goal);