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

VCAI::validateVisitableObjs: drop unused code that

For whatever reason it's not removed at compile time and still wasting CPU.
This commit is contained in:
Arseniy Shestakov 2016-08-11 14:54:58 +03:00
parent 6433d7dd40
commit 8533ee3256

View File

@ -1691,9 +1691,6 @@ void VCAI::clearPathsInfo()
void VCAI::validateVisitableObjs()
{
std::vector<const CGObjectInstance *> hlp;
retreiveVisitableObjs(hlp, true);
std::string errorMsg;
auto shouldBeErased = [&](const CGObjectInstance *obj) -> bool
{
@ -1701,15 +1698,6 @@ void VCAI::validateVisitableObjs()
return !cb->getObj(obj->id, false); // no verbose output needed as we check object visibility
else
return true;
//why would we have our local logic for object checks? use cb!
//if(!vstd::contains(hlp, obj))
//{
// logAi->errorStream() << helperObjInfo[obj].name << " at " << helperObjInfo[obj].pos << errorMsg;
// return true;
//}
//return false;
};
//errorMsg is captured by ref so lambda will take the new text