summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorGabda <gabda87@gmail.com>2019-02-09 00:05:25 +0100
committerCharles Pigott <charlespigott@googlemail.com>2019-02-08 23:05:25 +0000
commit37bb2c930828260cd28365c8d96befea096bacd6 (patch)
tree0fe5efa02b36db2a08440c264a1d1a9a0494115f /src/saveload
parent5e4f76f2f9ad105f619003657229b3bbd87ba678 (diff)
downloadopenttd-37bb2c930828260cd28365c8d96befea096bacd6.tar.xz
Codechange: Make the style of MakeVoid calls uniform (#7192)
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/afterload.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index d0b4723c6..0b570966d 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -204,10 +204,8 @@ static void UpdateCurrencies()
*/
static void UpdateVoidTiles()
{
- uint i;
-
- for (i = 0; i < MapMaxY(); ++i) MakeVoid(i * MapSizeX() + MapMaxX());
- for (i = 0; i < MapSizeX(); ++i) MakeVoid(MapSizeX() * MapMaxY() + i);
+ for (uint x = 0; x < MapSizeX(); x++) MakeVoid(TileXY(x, MapMaxY()));
+ for (uint y = 0; y < MapSizeY(); y++) MakeVoid(TileXY(MapMaxX(), y));
}
static inline RailType UpdateRailType(RailType rt, RailType min)