diff options
author | glx22 <glx@openttd.org> | 2021-05-12 16:45:28 +0200 |
---|---|---|
committer | Loïc Guilloux <glx22@users.noreply.github.com> | 2021-05-13 00:13:54 +0200 |
commit | 38c97e14926f4bc538c20b24f8a3decdef1668f9 (patch) | |
tree | 2138fa9979f463c5b946653c23313fbb977be652 /src/openttd.cpp | |
parent | 5bd81448539b63519d70ba85d4833e446f0597fe (diff) | |
download | openttd-38c97e14926f4bc538c20b24f8a3decdef1668f9.tar.xz |
Codechange: Replace TILE_AREA_LOOP with range-based for loops
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r-- | src/openttd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp index 785ba80dd..a416f531a 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -1265,7 +1265,7 @@ static void CheckCaches() /* Check docking tiles */ TileArea ta; std::map<TileIndex, bool> docking_tiles; - TILE_AREA_LOOP(tile, st->docking_station) { + for (TileIndex tile : st->docking_station) { ta.Add(tile); docking_tiles[tile] = IsDockingTile(tile); } @@ -1273,7 +1273,7 @@ static void CheckCaches() if (ta.tile != st->docking_station.tile || ta.w != st->docking_station.w || ta.h != st->docking_station.h) { DEBUG(desync, 2, "station docking mismatch: station %i, company %i", st->index, (int)st->owner); } - TILE_AREA_LOOP(tile, ta) { + for (TileIndex tile : ta) { if (docking_tiles[tile] != IsDockingTile(tile)) { DEBUG(desync, 2, "docking tile mismatch: tile %i", (int)tile); } |