Codechange: Replace FOR_ALL_ROADTRAMTYPES with range-based for loops

This commit is contained in:
glx22
2021-04-30 17:01:26 +02:00
committed by Loïc Guilloux
parent 983c7ade60
commit 2feb801e56
6 changed files with 12 additions and 12 deletions

View File

@@ -1811,7 +1811,7 @@ static void ChangeTileOwner_TunnelBridge(TileIndex tile, Owner old_owner, Owner
* don't want to update the infrastructure counts twice. */
uint num_pieces = tile < other_end ? (GetTunnelBridgeLength(tile, other_end) + 2) * TUNNELBRIDGE_TRACKBIT_FACTOR : 0;
FOR_ALL_ROADTRAMTYPES(rtt) {
for (RoadTramType rtt : _roadtramtypes) {
/* Update all roadtypes, no matter if they are present */
if (GetRoadOwner(tile, rtt) == old_owner) {
RoadType rt = GetRoadType(tile, rtt);