From ddabfed1cd3efa9ee229214207a60fc7cb3e0641 Mon Sep 17 00:00:00 2001 From: glx Date: Sun, 15 Dec 2019 05:55:59 +0100 Subject: Codechange: Replace station related FOR_ALL with range-based for loops --- src/script/api/script_depotlist.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/script/api/script_depotlist.cpp') 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)); -- cgit v1.2.3-54-g00ecf