(svn r9672) -Cleanup: lots of coding style fixes around operands.

This commit is contained in:
rubidium
2007-04-18 22:10:36 +00:00
parent 0d32783f87
commit 7577954ced
62 changed files with 1051 additions and 1051 deletions

View File

@@ -86,9 +86,9 @@ TileIndex TileAdd(TileIndex tile, TileIndexDiff add,
#endif
}
assert(TileXY(x,y) == TILE_MASK(tile + add));
assert(TileXY(x, y) == TILE_MASK(tile + add));
return TileXY(x,y);
return TileXY(x, y);
}
#endif
@@ -98,7 +98,7 @@ uint ScaleByMapSize(uint n)
/* First shift by 12 to prevent integer overflow for large values of n.
* >>12 is safe since the min mapsize is 64x64
* Add (1<<4)-1 to round upwards. */
return (n * (MapSize() >> 12) + (1<<4) - 1) >> 4;
return (n * (MapSize() >> 12) + (1 << 4) - 1) >> 4;
}
@@ -109,7 +109,7 @@ uint ScaleByMapSize1D(uint n)
* Note, not actually taking the full circumference into account,
* just half of it.
* (1<<9) - 1 is there to scale upwards. */
return (n * (MapSizeX() + MapSizeY()) + (1<<9) - 1) >> 9;
return (n * (MapSizeX() + MapSizeY()) + (1 << 9) - 1) >> 9;
}