summaryrefslogtreecommitdiff
path: root/src/script/api/script_depotlist.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/script/api/script_depotlist.cpp
parent3a14cea068d130e11b5d9dde11d4451dd7dec453 (diff)
downloadopenttd-ddabfed1cd3efa9ee229214207a60fc7cb3e0641.tar.xz
Codechange: Replace station related FOR_ALL with range-based for loops
Diffstat (limited to 'src/script/api/script_depotlist.cpp')
-rw-r--r--src/script/api/script_depotlist.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/script/api/script_depotlist.cpp b/src/script/api/script_depotlist.cpp
index be0071473..ab2e09cfd 100644
--- a/src/script/api/script_depotlist.cpp
+++ b/src/script/api/script_depotlist.cpp
@@ -26,8 +26,7 @@ ScriptDepotList::ScriptDepotList(ScriptTile::TransportType transport_type)
case ScriptTile::TRANSPORT_AIR: {
/* Hangars are not seen as real depots by the depot code. */
- const Station *st;
- FOR_ALL_STATIONS(st) {
+ for (const Station *st : Station::Iterate()) {
if (st->owner == ScriptObject::GetCompany() || ScriptObject::GetCompany() == OWNER_DEITY) {
for (uint i = 0; i < st->airport.GetNumHangars(); i++) {
this->AddItem(st->airport.GetHangarTile(i));