summaryrefslogtreecommitdiff
path: root/src/station.cpp
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2019-12-16 18:51:20 +0100
committerNiels Martin Hansen <nielsm@indvikleren.dk>2019-12-21 20:13:03 +0100
commit00c2a98cf395d6e2a85290048e7be7a7f6ce0d04 (patch)
tree78cc73b1290a8076f3a1b7d6bbfad9aef1acba8d /src/station.cpp
parent4ae829cb272225c7e07e233a94c2d945077f432a (diff)
downloadopenttd-00c2a98cf395d6e2a85290048e7be7a7f6ce0d04.tar.xz
Codechange: Replace FOR_ALL_INDUSTRIES with range-based for loops
Diffstat (limited to 'src/station.cpp')
-rw-r--r--src/station.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/station.cpp b/src/station.cpp
index 2a343d798..01311ece3 100644
--- a/src/station.cpp
+++ b/src/station.cpp
@@ -385,8 +385,7 @@ void Station::RemoveFromAllNearbyLists()
{
Town *t;
FOR_ALL_TOWNS(t) { t->stations_near.erase(this); }
- Industry *i;
- FOR_ALL_INDUSTRIES(i) { i->stations_near.erase(this); }
+ for (Industry *i : Industry::Iterate()) { i->stations_near.erase(this); }
}
/**