mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-26 22:57:00 +02:00
VCAI: use copy_if instead of erase_if for teleport exit probing list
This commit is contained in:
parent
496338813c
commit
8524bdbc25
@ -616,11 +616,10 @@ void VCAI::showTeleportDialog(TeleportChannelID channel, std::vector<ObjectInsta
|
|||||||
|
|
||||||
if(!status.channelProbing())
|
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user