(svn r27893) -Codechange: Use fallthrough attribute. (LordAro)
This commit is contained in:
@@ -2633,8 +2633,8 @@ static int CalcHeightdiff(HighLightStyle style, uint distance, TileIndex start_t
|
||||
byte style_t = (byte)(TileX(end_tile) > TileX(start_tile));
|
||||
start_tile = TILE_ADD(start_tile, ToTileIndexDiff(heightdiff_area_by_dir[style_t]));
|
||||
end_tile = TILE_ADD(end_tile, ToTileIndexDiff(heightdiff_area_by_dir[2 + style_t]));
|
||||
/* FALL THROUGH */
|
||||
}
|
||||
FALLTHROUGH;
|
||||
|
||||
case HT_POINT:
|
||||
h0 = TileHeight(start_tile);
|
||||
@@ -2979,7 +2979,7 @@ void VpSelectTilesWithMethod(int x, int y, ViewportPlaceMethod method)
|
||||
|
||||
case VPM_X_LIMITED: // Drag in X direction (limited size).
|
||||
limit = (_thd.sizelimit - 1) * TILE_SIZE;
|
||||
/* FALL THROUGH */
|
||||
FALLTHROUGH;
|
||||
|
||||
case VPM_FIX_X: // drag in Y direction
|
||||
x = sx;
|
||||
@@ -2988,7 +2988,7 @@ void VpSelectTilesWithMethod(int x, int y, ViewportPlaceMethod method)
|
||||
|
||||
case VPM_Y_LIMITED: // Drag in Y direction (limited size).
|
||||
limit = (_thd.sizelimit - 1) * TILE_SIZE;
|
||||
/* FALL THROUGH */
|
||||
FALLTHROUGH;
|
||||
|
||||
case VPM_FIX_Y: // drag in X direction
|
||||
y = sy;
|
||||
@@ -3026,7 +3026,7 @@ calc_heightdiff_single_direction:;
|
||||
limit = (_thd.sizelimit - 1) * TILE_SIZE;
|
||||
x = sx + Clamp(x - sx, -limit, limit);
|
||||
y = sy + Clamp(y - sy, -limit, limit);
|
||||
/* FALL THROUGH */
|
||||
FALLTHROUGH;
|
||||
|
||||
case VPM_X_AND_Y: // drag an X by Y area
|
||||
if (_settings_client.gui.measure_tooltip) {
|
||||
|
Reference in New Issue
Block a user