summaryrefslogtreecommitdiff
path: root/src/station_gui.cpp
diff options
context:
space:
mode:
authorglx22 <glx@openttd.org>2021-05-12 16:45:28 +0200
committerLoïc Guilloux <glx22@users.noreply.github.com>2021-05-13 00:13:54 +0200
commit38c97e14926f4bc538c20b24f8a3decdef1668f9 (patch)
tree2138fa9979f463c5b946653c23313fbb977be652 /src/station_gui.cpp
parent5bd81448539b63519d70ba85d4833e446f0597fe (diff)
downloadopenttd-38c97e14926f4bc538c20b24f8a3decdef1668f9.tar.xz
Codechange: Replace TILE_AREA_LOOP with range-based for loops
Diffstat (limited to 'src/station_gui.cpp')
-rw-r--r--src/station_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/station_gui.cpp b/src/station_gui.cpp
index cf3f455bc..ab0eb5d1a 100644
--- a/src/station_gui.cpp
+++ b/src/station_gui.cpp
@@ -103,7 +103,7 @@ static void FindStationsAroundSelection()
Station *adjacent = nullptr;
/* Direct loop instead of ForAllStationsAroundTiles as we are not interested in catchment area */
- TILE_AREA_LOOP(tile, ta) {
+ for (TileIndex tile : ta) {
if (IsTileType(tile, MP_STATION) && GetTileOwner(tile) == _local_company) {
Station *st = Station::GetByTile(tile);
if (st == nullptr) continue;
@@ -2214,7 +2214,7 @@ static const T *FindStationsNearby(TileArea ta, bool distant_join)
_deleted_stations_nearby.clear();
/* Check the inside, to return, if we sit on another station */
- TILE_AREA_LOOP(t, ta) {
+ for (TileIndex t : ta) {
if (t < MapSize() && IsTileType(t, MP_STATION) && T::IsValidID(GetStationIndex(t))) return T::GetByTile(t);
}