From 80c259f64fd38cdb84f2bcb8a146e7ec4a448070 Mon Sep 17 00:00:00 2001 From: rubidium Date: Wed, 18 Apr 2007 22:10:36 +0000 Subject: (svn r9672) -Cleanup: lots of coding style fixes around operands. --- src/map.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/map.cpp') diff --git a/src/map.cpp b/src/map.cpp index 00655a42e..eadaffb5f 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -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; } -- cgit v1.2.3-54-g00ecf