summaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2019-12-15 17:54:05 +0100
committerNiels Martin Hansen <nielsm@indvikleren.dk>2019-12-21 20:13:03 +0100
commitfa9769f81a0f96324a7a72f272626c395e002ece (patch)
tree77119ee7a1d62cb3e70107ecbf07da1777c4111c /src/script
parent5fce5fa300318db4e87849c2269a0e013d6f89e1 (diff)
downloadopenttd-fa9769f81a0f96324a7a72f272626c395e002ece.tar.xz
Codechange: Replace FOR_ALL_DEPOTS with range-based for loops
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);
}
}