Codechange: Replace TILE_AREA_LOOP with range-based for loops
This commit is contained in:
@@ -186,7 +186,7 @@
|
||||
if (!HasHeliport(industry_id)) return INVALID_TILE;
|
||||
|
||||
const Industry *ind = ::Industry::Get(industry_id);
|
||||
TILE_AREA_LOOP(tile_cur, ind->location) {
|
||||
for (TileIndex tile_cur : ind->location) {
|
||||
if (IsTileType(tile_cur, MP_STATION) && IsOilRig(tile_cur)) {
|
||||
return tile_cur;
|
||||
}
|
||||
@@ -208,7 +208,7 @@
|
||||
if (!HasDock(industry_id)) return INVALID_TILE;
|
||||
|
||||
const Industry *ind = ::Industry::Get(industry_id);
|
||||
TILE_AREA_LOOP(tile_cur, ind->location) {
|
||||
for (TileIndex tile_cur : ind->location) {
|
||||
if (IsTileType(tile_cur, MP_STATION) && IsOilRig(tile_cur)) {
|
||||
return tile_cur;
|
||||
}
|
||||
|
Reference in New Issue
Block a user