Codechange: Replace FOR_ALL_ROADTRAMTYPES with range-based for loops

(cherry picked from commit 2feb801e56)
This commit is contained in:
glx22
2021-04-30 17:01:26 +02:00
committed by Jonathan G Rennison
parent 72cfb991e5
commit 8333323090
6 changed files with 13 additions and 13 deletions

View File

@@ -2160,7 +2160,7 @@ bool AfterLoadGame()
}
} else if (IsTileType(t, MP_ROAD)) {
/* works for all RoadTileType */
FOR_ALL_ROADTRAMTYPES(rtt) {
for (RoadTramType rtt : _roadtramtypes) {
/* update even non-existing road types to update tile owner too */
Owner o = GetRoadOwner(t, rtt);
if (o < MAX_COMPANIES && !Company::IsValidID(o)) SetRoadOwner(t, rtt, OWNER_NONE);