diff options
Diffstat (limited to 'src/town_cmd.cpp')
-rw-r--r-- | src/town_cmd.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 43f3523f8..a0f5df23e 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -2779,8 +2779,7 @@ CommandCost CmdRenameTown(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 */ const CargoSpec *FindFirstCargoWithTownEffect(TownEffect effect) { - const CargoSpec *cs; - FOR_ALL_CARGOSPECS(cs) { + for (const CargoSpec *cs : CargoSpec::Iterate()) { if (cs->town_effect == effect) return cs; } return nullptr; |