Codechange: Replace FOR_ALL_ROADTRAMTYPES with range-based for loops
(cherry picked from commit 2feb801e56
)
This commit is contained in:

committed by
Jonathan G Rennison

parent
72cfb991e5
commit
8333323090
@@ -133,7 +133,7 @@ void AfterLoadCompanyStats()
|
||||
}
|
||||
|
||||
/* Iterate all present road types as each can have a different owner. */
|
||||
FOR_ALL_ROADTRAMTYPES(rtt) {
|
||||
for (RoadTramType rtt : _roadtramtypes) {
|
||||
RoadType rt = GetRoadType(tile, rtt);
|
||||
if (rt == INVALID_ROADTYPE) continue;
|
||||
c = Company::GetIfValid(IsRoadDepot(tile) ? GetTileOwner(tile) : GetRoadOwner(tile, rtt));
|
||||
@@ -156,7 +156,7 @@ void AfterLoadCompanyStats()
|
||||
case STATION_BUS:
|
||||
case STATION_TRUCK: {
|
||||
/* Iterate all present road types as each can have a different owner. */
|
||||
FOR_ALL_ROADTRAMTYPES(rtt) {
|
||||
for (RoadTramType rtt : _roadtramtypes) {
|
||||
RoadType rt = GetRoadType(tile, rtt);
|
||||
if (rt == INVALID_ROADTYPE) continue;
|
||||
c = Company::GetIfValid(GetRoadOwner(tile, rtt));
|
||||
|
Reference in New Issue
Block a user