forked from mirror/OpenTTD
Codechange: Remove FOR_EACH_SET_BIT
This commit is contained in:
@@ -1246,8 +1246,7 @@ void TileLoop_Water(TileIndex tile)
|
||||
|
||||
case FLOOD_DRYUP: {
|
||||
Slope slope_here = GetFoundationSlope(tile) & ~SLOPE_HALFTILE_MASK & ~SLOPE_STEEP;
|
||||
uint dir;
|
||||
FOR_EACH_SET_BIT(dir, _flood_from_dirs[slope_here]) {
|
||||
for (uint dir : SetBitIterator(_flood_from_dirs[slope_here])) {
|
||||
TileIndex dest = tile + TileOffsByDir((Direction)dir);
|
||||
if (!IsValidTile(dest)) continue;
|
||||
|
||||
@@ -1285,8 +1284,7 @@ void ConvertGroundTilesIntoWaterTiles()
|
||||
break;
|
||||
|
||||
default:
|
||||
uint dir;
|
||||
FOR_EACH_SET_BIT(dir, _flood_from_dirs[slope & ~SLOPE_STEEP]) {
|
||||
for (uint dir : SetBitIterator(_flood_from_dirs[slope & ~SLOPE_STEEP])) {
|
||||
TileIndex dest = TileAddByDir(tile, (Direction)dir);
|
||||
Slope slope_dest = GetTileSlope(dest) & ~SLOPE_STEEP;
|
||||
if (slope_dest == SLOPE_FLAT || IsSlopeWithOneCornerRaised(slope_dest)) {
|
||||
|
Reference in New Issue
Block a user