mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Simplify statements
-Simplify return statements across the code
This commit is contained in:
committed by
Alexander Shishkin
parent
ec536e613c
commit
ac6b477aa2
@@ -309,16 +309,7 @@ CDrawRoadsOperation::ValidationResult CDrawRoadsOperation::validateTile(const Ro
|
||||
|
||||
int3 currentPos(cx, cy, pos.z);
|
||||
|
||||
bool hasSomething;
|
||||
|
||||
if(!map->isInTheMap(currentPos))
|
||||
{
|
||||
hasSomething = true; //road/river can go out of map
|
||||
}
|
||||
else
|
||||
{
|
||||
hasSomething = tileHasSomething(currentPos);
|
||||
}
|
||||
bool hasSomething = !map->isInTheMap(currentPos) || tileHasSomething(currentPos);
|
||||
|
||||
if(ruleIsSomething(flipped.data[i]))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user