Codechange: Replace old non-standard attributes with C++17/20 standard attributes.

This commit is contained in:
frosch
2024-01-31 21:03:17 +01:00
committed by frosch
parent 8a4f0c4b02
commit b1718478c8
79 changed files with 169 additions and 206 deletions

View File

@@ -2895,7 +2895,7 @@ 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]));
FALLTHROUGH;
[[fallthrough]];
}
case HT_POINT:
@@ -3240,7 +3240,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;
FALLTHROUGH;
[[fallthrough]];
case VPM_FIX_X: // drag in Y direction
x = sx;
@@ -3249,7 +3249,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;
FALLTHROUGH;
[[fallthrough]];
case VPM_FIX_Y: // drag in X direction
y = sy;
@@ -3286,7 +3286,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);
FALLTHROUGH;
[[fallthrough]];
case VPM_X_AND_Y: // drag an X by Y area
if (_settings_client.gui.measure_tooltip) {