Codechange: Replace station related FOR_ALL with range-based for loops
This commit is contained in:
@@ -708,8 +708,7 @@ static void Disaster_Zeppeliner_Init()
|
||||
/* Pick a random place, unless we find a small airport */
|
||||
int x = TileX(Random()) * TILE_SIZE + TILE_SIZE / 2;
|
||||
|
||||
Station *st;
|
||||
FOR_ALL_STATIONS(st) {
|
||||
for (const Station *st : Station::Iterate()) {
|
||||
if (st->airport.tile != INVALID_TILE && (st->airport.type == AT_SMALL || st->airport.type == AT_LARGE)) {
|
||||
x = (TileX(st->airport.tile) + 2) * TILE_SIZE;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user