Codechange: Use Map::Iterate() to iterate tiles
This commit is contained in:
+1
-1
@@ -367,7 +367,7 @@ uint GetClosestWaterDistance(TileIndex tile, bool water)
|
||||
|
||||
if (!water) {
|
||||
/* no land found - is this a water-only map? */
|
||||
for (TileIndex t = 0; t < Map::Size(); t++) {
|
||||
for (const auto t : Map::Iterate()) {
|
||||
if (!IsTileType(t, MP_VOID) && !IsTileType(t, MP_WATER)) return 0x1FF;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user