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:
committed by
Alexander Shishkin
parent
ec536e613c
commit
ac6b477aa2
@ -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)
|
||||
|
Reference in New Issue
Block a user