> Instead of your nested if and else statement you can use just two if
> statement.
>
> if ((fc.field->nodecaps() & ~MOVECAPS_SWIM) and ((fc.field->nodecaps() &
> MOVECAPS_WALK) or fc.field->get_immovable())) {
> m_land_size_total++;
> if (Player_Number const owner = fc.field->get_owned_by())
> ++land_size[owner - 1];
> }
>
> Is it even necessary to check if the field is not "swimmable"? Can a field be
> walkable and swimmable (I don't think so) or swimmable and have and immovable
> (I am not sure about that)?
ShallowWater could be passable for Ships and LandUnits.
> Instead of your nested if and else statement you can use just two if >nodecaps( ) & ~MOVECAPS_SWIM) and ((fc.field- >nodecaps( ) & >get_immovable( ))) { size_total+ +; >get_owned_ by())
> statement.
>
> if ((fc.field-
> MOVECAPS_WALK) or fc.field-
> m_land_
> if (Player_Number const owner = fc.field-
> ++land_size[owner - 1];
> }
>
> Is it even necessary to check if the field is not "swimmable"? Can a field be
> walkable and swimmable (I don't think so) or swimmable and have and immovable
> (I am not sure about that)?
ShallowWater could be passable for Ships and LandUnits.