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
commit7577954ced47f09803bc1b3881d47f222dbd306b (patch)
treef018095aed2d70f8386d800c8e8ac662f4b9c8fa /src/map.cpp
parent0d32783f87b9a32fa8f0bf539514ed08faebbd2a (diff)
downloadopenttd-7577954ced47f09803bc1b3881d47f222dbd306b.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;
}