Codechange: Use Map::Iterate() to iterate tiles

This commit is contained in:
SamuXarick
2024-10-27 18:52:57 +00:00
committed by rubidium42
parent cfb995b6e9
commit 10e2d1ca36
15 changed files with 36 additions and 36 deletions
+1 -1
View File
@@ -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;
}
}