summaryrefslogtreecommitdiff
path: root/src/town_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/town_cmd.cpp')
-rw-r--r--src/town_cmd.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index 2c7393ce5..cf539b09b 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -2883,8 +2883,7 @@ CommandCost CmdDeleteTown(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
}
/* Depots refer to towns. */
- const Depot *d;
- FOR_ALL_DEPOTS(d) {
+ for (const Depot *d : Depot::Iterate()) {
if (d->town == t) return CMD_ERROR;
}