1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-17 00:07:41 +02:00

Simplify statements

-Simplify return statements across the code
This commit is contained in:
Michał Kalinowski
2019-03-20 20:58:15 +01:00
committed by Alexander Shishkin
parent ec536e613c
commit ac6b477aa2
21 changed files with 45 additions and 148 deletions

View File

@ -1279,12 +1279,8 @@ void CGWhirlpool::teleportDialogAnswered(const CGHeroInstance *hero, ui32 answer
bool CGWhirlpool::isProtected(const CGHeroInstance * h)
{
if(h->hasBonusOfType(Bonus::WHIRLPOOL_PROTECTION) ||
(h->stacksCount() == 1 && h->Slots().begin()->second->count == 1)) //we can't remove last unit
{
return true;
}
return false;
return h->hasBonusOfType(Bonus::WHIRLPOOL_PROTECTION)
|| (h->stacksCount() == 1 && h->Slots().begin()->second->count == 1);
}
void CGArtifact::initObj(CRandomGenerator & rand)