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

@@ -38,7 +38,7 @@ ScriptError::ScriptErrorMapString ScriptError::error_map_string = ScriptError::S
case TEXT_TAB_SPECIAL:
if (index < 0xE4) break; // Player name
FALLTHROUGH;
[[fallthrough]];
case TEXT_TAB_TOWN:
if (index < 0xC0) break; // Town name

View File

@@ -153,13 +153,13 @@ void CargoCollector::Update(StationID from, StationID via, uint amount)
switch (Tselector) {
case ScriptStationList_Cargo::CS_VIA_BY_FROM:
if (via != this->other_station) return;
FALLTHROUGH;
[[fallthrough]];
case ScriptStationList_Cargo::CS_BY_FROM:
key = from;
break;
case ScriptStationList_Cargo::CS_FROM_BY_VIA:
if (from != this->other_station) return;
FALLTHROUGH;
[[fallthrough]];
case ScriptStationList_Cargo::CS_BY_VIA:
key = via;
break;