From ee7a8eebca774666cd3625431a86dd05113b5e88 Mon Sep 17 00:00:00 2001 From: glx Date: Tue, 17 Dec 2019 22:04:09 +0100 Subject: Codechange: Replace FOR_ALL_TOWNS with range-based for loops --- src/station.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/station.cpp') diff --git a/src/station.cpp b/src/station.cpp index 3e00bdb14..61c53bc56 100644 --- a/src/station.cpp +++ b/src/station.cpp @@ -381,8 +381,7 @@ static void AddIndustryToDeliver(Industry *ind, Station *st) */ void Station::RemoveFromAllNearbyLists() { - Town *t; - FOR_ALL_TOWNS(t) { t->stations_near.erase(this); } + for (Town *t : Town::Iterate()) { t->stations_near.erase(this); } for (Industry *i : Industry::Iterate()) { i->stations_near.erase(this); } } -- cgit v1.2.3-54-g00ecf