summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/network/core/udp.cpp2
-rw-r--r--src/newgrf_gui.cpp4
-rw-r--r--src/newgrf_object.h2
-rw-r--r--src/newgrf_station.h2
-rw-r--r--src/rail_cmd.cpp2
-rw-r--r--src/saveload/vehicle_sl.cpp2
-rw-r--r--src/script/api/script_stationlist.cpp4
-rw-r--r--src/town_gui.cpp2
-rw-r--r--src/vehicle_gui.cpp8
-rw-r--r--src/viewport.cpp2
10 files changed, 15 insertions, 15 deletions
diff --git a/src/network/core/udp.cpp b/src/network/core/udp.cpp
index 20b1ce119..d2dc15d42 100644
--- a/src/network/core/udp.cpp
+++ b/src/network/core/udp.cpp
@@ -252,8 +252,8 @@ void NetworkUDPSocketHandler::ReceiveNetworkGameInfo(Packet *p, NetworkGameInfo
*dst = c;
dst = &c->next;
}
+ FALLTHROUGH;
}
- FALLTHROUGH;
case 3:
info->game_date = Clamp(p->Recv_uint32(), 0, MAX_DATE);
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp
index c0aa160c2..d71e052da 100644
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -1033,8 +1033,8 @@ struct NewGRFWindow : public Window, NewGRFScanCallback {
break;
}
/* With double click, continue */
+ FALLTHROUGH;
}
- FALLTHROUGH;
case WID_NS_REMOVE: { // Remove GRF
if (this->active_sel == NULL || !this->editable) break;
@@ -1089,8 +1089,8 @@ struct NewGRFWindow : public Window, NewGRFScanCallback {
break;
}
/* With double click, continue */
+ FALLTHROUGH;
}
- FALLTHROUGH;
case WID_NS_ADD:
if (this->avail_sel == NULL || !this->editable || HasBit(this->avail_sel->flags, GCF_INVALID)) break;
diff --git a/src/newgrf_object.h b/src/newgrf_object.h
index 69e1a3299..43c8de031 100644
--- a/src/newgrf_object.h
+++ b/src/newgrf_object.h
@@ -138,8 +138,8 @@ struct ObjectResolverObject : public ResolverObject {
case VSG_SCOPE_PARENT: {
TownScopeResolver *tsr = this->GetTown();
if (tsr != NULL) return tsr;
+ FALLTHROUGH;
}
- FALLTHROUGH;
default:
return ResolverObject::GetScope(scope, relative);
diff --git a/src/newgrf_station.h b/src/newgrf_station.h
index 5413a4c08..fc4278571 100644
--- a/src/newgrf_station.h
+++ b/src/newgrf_station.h
@@ -68,8 +68,8 @@ struct StationResolverObject : public ResolverObject {
case VSG_SCOPE_PARENT: {
TownScopeResolver *tsr = this->GetTown();
if (tsr != NULL) return tsr;
+ FALLTHROUGH;
}
- FALLTHROUGH;
default:
return ResolverObject::GetScope(scope, relative);
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
index 9f284fc30..5bc97a58d 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -554,8 +554,8 @@ CommandCost CmdBuildSingleRail(TileIndex tile, DoCommandFlag flags, uint32 p1, u
if (IsLevelCrossing(tile) && GetCrossingRailBits(tile) == trackbit) {
return_cmd_error(STR_ERROR_ALREADY_BUILT);
}
+ FALLTHROUGH;
}
- FALLTHROUGH;
default: {
/* Will there be flat water on the lower halftile? */
diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp
index 2234659ab..0bd283405 100644
--- a/src/saveload/vehicle_sl.cpp
+++ b/src/saveload/vehicle_sl.cpp
@@ -433,8 +433,8 @@ void AfterLoadVehicles(bool part_of_load)
RoadVehicle *rv = RoadVehicle::From(v);
rv->roadtype = HasBit(EngInfo(v->First()->engine_type)->misc_flags, EF_ROAD_TRAM) ? ROADTYPE_TRAM : ROADTYPE_ROAD;
rv->compatible_roadtypes = RoadTypeToRoadTypes(rv->roadtype);
+ FALLTHROUGH;
}
- FALLTHROUGH;
case VEH_TRAIN:
case VEH_SHIP:
diff --git a/src/script/api/script_stationlist.cpp b/src/script/api/script_stationlist.cpp
index ab9503a1b..51a06b5a7 100644
--- a/src/script/api/script_stationlist.cpp
+++ b/src/script/api/script_stationlist.cpp
@@ -151,13 +151,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;
- /* fall through */
+ FALLTHROUGH;
case ScriptStationList_Cargo::CS_BY_FROM:
key = from;
break;
case ScriptStationList_Cargo::CS_FROM_BY_VIA:
if (from != this->other_station) return;
- /* fall through */
+ FALLTHROUGH;
case ScriptStationList_Cargo::CS_BY_VIA:
key = via;
break;
diff --git a/src/town_gui.cpp b/src/town_gui.cpp
index 696b71afd..a87c29367 100644
--- a/src/town_gui.cpp
+++ b/src/town_gui.cpp
@@ -269,8 +269,8 @@ public:
}
/* When double-clicking, continue */
if (click_count == 1 || y < 0) break;
+ FALLTHROUGH;
}
- FALLTHROUGH;
case WID_TA_EXECUTE:
DoCommandP(this->town->xy, this->window_number, this->sel_index, CMD_DO_TOWN_ACTION | CMD_MSG(STR_ERROR_CAN_T_DO_THIS));
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp
index f060191c9..62205ee5a 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -817,8 +817,8 @@ struct RefitWindow : public Window {
Vehicle *v = Vehicle::Get(this->window_number);
this->selected_vehicle = v->index;
this->num_vehicles = UINT8_MAX;
+ FALLTHROUGH;
}
- FALLTHROUGH;
case 2: { // The vehicle selection has changed; rebuild the entire list.
if (!gui_scope) break;
@@ -843,8 +843,8 @@ struct RefitWindow : public Window {
this->information_width = max_width;
this->ReInit();
}
+ FALLTHROUGH;
}
- FALLTHROUGH;
case 1: // A new cargo has been selected.
if (!gui_scope) break;
@@ -905,8 +905,8 @@ struct RefitWindow : public Window {
if (_ctrl_pressed) this->num_vehicles = UINT8_MAX;
break;
}
+ FALLTHROUGH;
}
- FALLTHROUGH;
default:
/* Clear the selection. */
@@ -940,8 +940,8 @@ struct RefitWindow : public Window {
this->InvalidateData(1);
if (click_count == 1) break;
+ FALLTHROUGH;
}
- FALLTHROUGH;
case WID_VR_REFIT: // refit button
if (this->cargo != NULL) {
diff --git a/src/viewport.cpp b/src/viewport.cpp
index 6de827b4e..07d4e92fd 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -2636,8 +2636,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]));
+ FALLTHROUGH;
}
- FALLTHROUGH;
case HT_POINT:
h0 = TileHeight(start_tile);