diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp index 9d7dc389a8..24d3f4186f 100644 --- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -1255,8 +1255,8 @@ void TileLoop_Water(TileIndex tile) case FLOOD_DRYUP: { Slope slope_here = std::get<0>(GetFoundationSlope(tile)) & ~SLOPE_HALFTILE_MASK & ~SLOPE_STEEP; - for (uint dir : SetBitIterator(_flood_from_dirs[slope_here])) { - TileIndex dest = AddTileIndexDiffCWrap(tile, TileIndexDiffCByDir(static_cast(dir))); + for (Direction dir : SetBitIterator(_flood_from_dirs[slope_here])) { + TileIndex dest = AddTileIndexDiffCWrap(tile, TileIndexDiffCByDir(dir)); /* Contrary to flooding, drying up does consider MP_VOID tiles. */ if (dest == INVALID_TILE) continue; @@ -1292,8 +1292,8 @@ void ConvertGroundTilesIntoWaterTiles() break; default: - for (uint dir : SetBitIterator(_flood_from_dirs[slope & ~SLOPE_STEEP])) { - TileIndex dest = TileAddByDir(tile, (Direction)dir); + for (Direction dir : SetBitIterator(_flood_from_dirs[slope & ~SLOPE_STEEP])) { + TileIndex dest = TileAddByDir(tile, dir); Slope slope_dest = GetTileSlope(dest) & ~SLOPE_STEEP; if (slope_dest == SLOPE_FLAT || IsSlopeWithOneCornerRaised(slope_dest) || IsTileType(dest, MP_VOID)) { MakeShore(tile);