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/newgrf_station.cpp | |
parent | 5bd81448539b63519d70ba85d4833e446f0597fe (diff) | |
download | openttd-38c97e14926f4bc538c20b24f8a3decdef1668f9.tar.xz |
Codechange: Replace TILE_AREA_LOOP with range-based for loops
Diffstat (limited to 'src/newgrf_station.cpp')
-rw-r--r-- | src/newgrf_station.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp index eff5ef2b2..fbc6f5c60 100644 --- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -737,7 +737,7 @@ void DeallocateSpecFromStation(BaseStation *st, byte specindex) ETileArea area = ETileArea(st, INVALID_TILE, TA_WHOLE); /* Check all tiles over the station to check if the specindex is still in use */ - TILE_AREA_LOOP(tile, area) { + for (TileIndex tile : area) { if (st->TileBelongsToRailStation(tile) && GetCustomStationSpecIndex(tile) == specindex) { return; } @@ -939,7 +939,7 @@ void TriggerStationAnimation(BaseStation *st, TileIndex tile, StationAnimationTr ETileArea area = ETileArea(st, tile, tas[trigger]); /* Check all tiles over the station to check if the specindex is still in use */ - TILE_AREA_LOOP(tile, area) { + for (TileIndex tile : area) { if (st->TileBelongsToRailStation(tile)) { const StationSpec *ss = GetStationSpec(tile); if (ss != nullptr && HasBit(ss->animation.triggers, trigger)) { @@ -995,7 +995,7 @@ void TriggerStationRandomisation(Station *st, TileIndex tile, StationRandomTrigg uint32 used_triggers = 0; /* Check all tiles over the station to check if the specindex is still in use */ - TILE_AREA_LOOP(tile, area) { + for (TileIndex tile : area) { if (st->TileBelongsToRailStation(tile)) { const StationSpec *ss = GetStationSpec(tile); if (ss == nullptr) continue; |