Codechange: Replace FOR_ALL_CARGOSPECS with range-based for loops
(cherry picked from commit 9a8756d7ed)
This commit is contained in:
committed by
Jonathan G Rennison
parent
dfe616bef4
commit
050b95e351
@@ -3102,8 +3102,7 @@ CommandCost CmdRenameTownNonAdmin(TileIndex tile, DoCommandFlag flags, uint32 p1
|
||||
*/
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user