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

@@ -165,7 +165,7 @@ bool IsPossibleDockingTile(Tile t)
switch (GetTileType(t)) {
case MP_WATER:
if (IsLock(t) && GetLockPart(t) == LOCK_PART_MIDDLE) return false;
FALLTHROUGH;
[[fallthrough]];
case MP_RAILWAY:
case MP_STATION:
case MP_TUNNELBRIDGE:
@@ -507,7 +507,7 @@ CommandCost CmdBuildCanal(DoCommandFlag flags, TileIndex tile, TileIndex start_t
MakeSea(current_tile);
break;
}
FALLTHROUGH;
[[fallthrough]];
default:
MakeCanal(current_tile, _current_company, Random());
@@ -1087,7 +1087,7 @@ FloodingBehaviour GetFloodingBehaviour(TileIndex tile)
Slope tileh = GetTileSlope(tile);
return (IsSlopeWithOneCornerRaised(tileh) ? FLOOD_ACTIVE : FLOOD_DRYUP);
}
FALLTHROUGH;
[[fallthrough]];
case MP_STATION:
case MP_INDUSTRY:
case MP_OBJECT:
@@ -1139,7 +1139,7 @@ void DoFloodTile(TileIndex target)
flooded = true;
break;
}
FALLTHROUGH;
[[fallthrough]];
case MP_CLEAR:
if (Command<CMD_LANDSCAPE_CLEAR>::Do(DC_EXEC, target).Succeeded()) {