1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

VCAI: use copy_if instead of erase_if for teleport exit probing list

This commit is contained in:
ArseniyShestakov 2015-03-09 03:24:39 +03:00
parent 496338813c
commit 8524bdbc25

View File

@ -616,11 +616,10 @@ void VCAI::showTeleportDialog(TeleportChannelID channel, std::vector<ObjectInsta
if(!status.channelProbing())
{
vstd::erase_if(exits, [&](ObjectInstanceID id) -> bool
vstd::copy_if(exits, vstd::set_inserter(teleportChannelProbingList), [&](ObjectInstanceID id) -> bool
{
return vstd::contains(visitableObjs, cb->getObj(id)) || id == choosenExit;
return !(vstd::contains(visitableObjs, cb->getObj(id)) || id == choosenExit);
});
teleportChannelProbingList = exits;
}
}