summaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
Diffstat (limited to 'src/script')
-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 ab2e09cfd..4b07636ce 100644
--- a/src/script/api/script_depotlist.cpp
+++ b/src/script/api/script_depotlist.cpp
@@ -38,8 +38,7 @@ ScriptDepotList::ScriptDepotList(ScriptTile::TransportType transport_type)
}
/* Handle 'standard' depots. */
- const Depot *depot;
- FOR_ALL_DEPOTS(depot) {
+ for (const Depot *depot : Depot::Iterate()) {
if ((::GetTileOwner(depot->xy) == ScriptObject::GetCompany() || ScriptObject::GetCompany() == OWNER_DEITY) && ::IsTileType(depot->xy, tile_type)) this->AddItem(depot->xy);
}
}