summaryrefslogtreecommitdiff
path: root/src/openttd.cpp
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2019-12-15 05:55:59 +0100
committerNiels Martin Hansen <nielsm@indvikleren.dk>2019-12-21 20:13:03 +0100
commitddabfed1cd3efa9ee229214207a60fc7cb3e0641 (patch)
tree824eddd3155d04363864731a43a6863cd7fbd2a3 /src/openttd.cpp
parent3a14cea068d130e11b5d9dde11d4451dd7dec453 (diff)
downloadopenttd-ddabfed1cd3efa9ee229214207a60fc7cb3e0641.tar.xz
Codechange: Replace station related FOR_ALL with range-based for loops
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r--src/openttd.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index fde01111d..cf79419cc 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -1313,8 +1313,7 @@ static void CheckCaches()
assert(memcmp(&v->cargo, buff, sizeof(VehicleCargoList)) == 0);
}
- Station *st;
- FOR_ALL_STATIONS(st) {
+ for (Station *st : Station::Iterate()) {
for (CargoID c = 0; c < NUM_CARGO; c++) {
byte buff[sizeof(StationCargoList)];
memcpy(buff, &st->goods[c].cargo, sizeof(StationCargoList));