diff options
author | frosch <frosch@openttd.org> | 2017-08-13 18:38:42 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2017-08-13 18:38:42 +0000 |
commit | b4b98e51655012ea42dbc8ab9e455fbec0d04b39 (patch) | |
tree | 948fc802d5dfdca71454f6ce479e4f429e98488d /src/viewport.cpp | |
parent | 19bae485b028380fbdc94d02ebaecdf3ca23f932 (diff) | |
download | openttd-b4b98e51655012ea42dbc8ab9e455fbec0d04b39.tar.xz |
(svn r27893) -Codechange: Use fallthrough attribute. (LordAro)
Diffstat (limited to 'src/viewport.cpp')
-rw-r--r-- | src/viewport.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp index a1bb2c81d..df431ff3c 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -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) { |