mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-15 20:03:15 +02:00
Seems to be actually a missing return and redundant check.
This commit is contained in:
@@ -3063,8 +3063,8 @@ const CGHeroInstance * CStack::getMyHero() const
|
|||||||
return dynamic_cast<const CGHeroInstance *>(base->armyObj);
|
return dynamic_cast<const CGHeroInstance *>(base->armyObj);
|
||||||
else //we are attached directly?
|
else //we are attached directly?
|
||||||
BOOST_FOREACH(const CBonusSystemNode *n, getParentNodes())
|
BOOST_FOREACH(const CBonusSystemNode *n, getParentNodes())
|
||||||
if(n->getNodeType() == HERO)
|
if(n->getNodeType() == HERO)
|
||||||
dynamic_cast<const CGHeroInstance *>(n);//FIXME: unused result. Missing return?
|
return dynamic_cast<const CGHeroInstance *>(n);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@@ -1517,7 +1517,6 @@ void CGameHandler::run(bool resume)
|
|||||||
for(; i != gs->players.end(); i++)
|
for(; i != gs->players.end(); i++)
|
||||||
{
|
{
|
||||||
if((i->second.towns.size()==0 && i->second.heroes.size()==0)
|
if((i->second.towns.size()==0 && i->second.heroes.size()==0)
|
||||||
//|| i->second.color<0 //FIXME: color is unsigned. Redundant or incorrect check?
|
|
||||||
|| i->first>=GameConstants::PLAYER_LIMIT
|
|| i->first>=GameConstants::PLAYER_LIMIT
|
||||||
|| i->second.status)
|
|| i->second.status)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user