diff options
author | rubidium <rubidium@openttd.org> | 2010-05-11 20:48:06 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-05-11 20:48:06 +0000 |
commit | be504a6ef0f26b78216699d6995ccc8dee02a5c1 (patch) | |
tree | 97bb83daf3620edf7a128da731e3e43d450d359d /src/water_cmd.cpp | |
parent | 26bf9a13deea2da71142a6259ede951e08e75d01 (diff) | |
download | openttd-be504a6ef0f26b78216699d6995ccc8dee02a5c1.tar.xz |
(svn r19788) -Codechange: make FOR_EACH_SET_BIT not change the value of the passed bit variable, i.e. allow expressions as parameter
Diffstat (limited to 'src/water_cmd.cpp')
-rw-r--r-- | src/water_cmd.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp index c3aadec8a..e93b268db 100644 --- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -1008,9 +1008,8 @@ void TileLoop_Water(TileIndex tile) case FLOOD_DRYUP: { Slope slope_here = GetFoundationSlope(tile, NULL) & ~SLOPE_HALFTILE_MASK & ~SLOPE_STEEP; - uint check_dirs = _flood_from_dirs[slope_here]; uint dir; - FOR_EACH_SET_BIT(dir, check_dirs) { + FOR_EACH_SET_BIT(dir, _flood_from_dirs[slope_here]) { TileIndex dest = AddTileIndexDiffCWrap(tile, TileIndexDiffCByDir((Direction)dir)); if (dest == INVALID_TILE) continue; @@ -1048,9 +1047,8 @@ void ConvertGroundTilesIntoWaterTiles() break; default: - uint check_dirs = _flood_from_dirs[slope & ~SLOPE_STEEP]; uint dir; - FOR_EACH_SET_BIT(dir, check_dirs) { + FOR_EACH_SET_BIT(dir, _flood_from_dirs[slope & ~SLOPE_STEEP]) { TileIndex dest = TILE_ADD(tile, TileOffsByDir((Direction)dir)); Slope slope_dest = GetTileSlope(dest, NULL) & ~SLOPE_STEEP; if (slope_dest == SLOPE_FLAT || IsSlopeWithOneCornerRaised(slope_dest)) { |