diff options
author | glx22 <glx@openttd.org> | 2021-04-29 17:51:05 +0200 |
---|---|---|
committer | Loïc Guilloux <glx22@users.noreply.github.com> | 2021-04-29 21:08:24 +0200 |
commit | 9a8756d7ed6fdde20bad9be8c8b8bc8fda0170f9 (patch) | |
tree | 54941350dff9cc05ee0e9b32e116df385f977a46 /src/newgrf_station.cpp | |
parent | 14e92bd8e241998ced263ee542965a71bbdd77a5 (diff) | |
download | openttd-9a8756d7ed6fdde20bad9be8c8b8bc8fda0170f9.tar.xz |
Codechange: Replace FOR_ALL_CARGOSPECS with range-based for loops
Diffstat (limited to 'src/newgrf_station.cpp')
-rw-r--r-- | src/newgrf_station.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp index a127d54c9..fa3f831aa 100644 --- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -572,8 +572,7 @@ StationResolverObject::StationResolverObject(const StationSpec *statspec, BaseSt } else if (Station::IsExpected(this->station_scope.st)) { const Station *st = Station::From(this->station_scope.st); /* Pick the first cargo that we have waiting */ - const CargoSpec *cs; - FOR_ALL_CARGOSPECS(cs) { + for (const CargoSpec *cs : CargoSpec::Iterate()) { if (this->station_scope.statspec->grf_prop.spritegroup[cs->Index()] != nullptr && st->goods[cs->Index()].cargo.TotalCount() > 0) { ctype = cs->Index(); |