1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Seems to be actually a missing return and redundant check.

This commit is contained in:
Michał W. Urbańczyk
2012-05-29 23:22:28 +00:00
parent faaf799d95
commit 247fabc3a6
2 changed files with 2 additions and 3 deletions

View File

@@ -3063,8 +3063,8 @@ const CGHeroInstance * CStack::getMyHero() const
return dynamic_cast<const CGHeroInstance *>(base->armyObj);
else //we are attached directly?
BOOST_FOREACH(const CBonusSystemNode *n, getParentNodes())
if(n->getNodeType() == HERO)
dynamic_cast<const CGHeroInstance *>(n);//FIXME: unused result. Missing return?
if(n->getNodeType() == HERO)
return dynamic_cast<const CGHeroInstance *>(n);
return NULL;
}