summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-04-18 22:10:36 +0000
committerrubidium <rubidium@openttd.org>2007-04-18 22:10:36 +0000
commit80c259f64fd38cdb84f2bcb8a146e7ec4a448070 (patch)
treef018095aed2d70f8386d800c8e8ac662f4b9c8fa /src/map.cpp
parent41cf2fa69b8ff60f1b1633b68f47434075d00d75 (diff)
downloadopenttd-80c259f64fd38cdb84f2bcb8a146e7ec4a448070.tar.xz
(svn r9672) -Cleanup: lots of coding style fixes around operands.
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp8
1 files changed, 4 insertions, 4 deletions
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;
}