diff --git a/src/fios_gui.cpp b/src/fios_gui.cpp index 4c32964788..466f1d1b5b 100644 --- a/src/fios_gui.cpp +++ b/src/fios_gui.cpp @@ -658,7 +658,7 @@ public: this->selected = NULL; _load_check_data.Clear(); BuildFileList(); - /* FALL THROUGH */ + /* FALL THROUGH */ case 1: /* Selection changes */ if (_saveload_mode == SLD_LOAD_GAME || _saveload_mode == SLD_LOAD_SCENARIO) { diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index 3b0cba62df..1ea0fe5663 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -1368,7 +1368,7 @@ struct QueryStringWindow : public QueryStringBaseWindow break; } case HEBR_CONFIRM: this->OnOk(); - /* FALL THROUGH */ + /* FALL THROUGH */ case HEBR_CANCEL: delete this; break; // close window, abandon changes case HEBR_NOT_FOCUSED: break; } diff --git a/src/network/core/udp.cpp b/src/network/core/udp.cpp index 679bfa3136..1163ee3bb2 100644 --- a/src/network/core/udp.cpp +++ b/src/network/core/udp.cpp @@ -246,7 +246,8 @@ void NetworkUDPSocketHandler::Recv_NetworkGameInfo(Packet *p, NetworkGameInfo *i *dst = c; dst = &c->next; } - } // FALL THROUGH + /* FALL THROUGH */ + } case 3: info->game_date = Clamp(p->Recv_uint32(), 0, MAX_DATE); info->start_date = Clamp(p->Recv_uint32(), 0, MAX_DATE); diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index bd539c106b..9a2347ba24 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -2312,8 +2312,8 @@ struct NetworkCompanyPasswordWindow : public QueryStringBaseWindow { switch (widget) { case NCPWW_OK: this->OnOk(); + /* FALL THROUGH */ - /* FALL THROUGH */ case NCPWW_CANCEL: delete this; break; diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index d769f49688..4256793c9b 100644 --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -747,8 +747,9 @@ struct NewGRFWindow : public QueryStringBaseWindow { this->InvalidateData(); if (click_count == 1) break; + /* FALL THROUGH, with double click. */ } - /* FALL THROUGH, with double click. */ + case SNGRFS_REMOVE: { // Remove GRF if (this->active_sel == NULL || !this->editable) break; DeleteWindowByClass(WC_GRF_PARAMETERS); @@ -787,8 +788,9 @@ struct NewGRFWindow : public QueryStringBaseWindow { } this->InvalidateData(); if (click_count == 1) break; + /* FALL THROUGH, with double click. */ } - /* FALL THROUGH, with double click. */ + case SNGRFS_ADD: { if (this->avail_sel == NULL || !this->editable) break; diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp index 45eb2293b7..d3d173da86 100644 --- a/src/saveload/vehicle_sl.cpp +++ b/src/saveload/vehicle_sl.cpp @@ -357,8 +357,9 @@ 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); - } /* FALL THROUGH */ + } + case VEH_TRAIN: case VEH_SHIP: v->cur_image = v->GetImage(v->direction); diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index fb2ab235ab..9868f60f94 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -2878,7 +2878,7 @@ static void TileLoop_Station(TileIndex tile) case STATION_DOCK: if (GetTileSlope(tile, NULL) != SLOPE_FLAT) break; // only handle water part - /* FALL THROUGH */ + /* FALL THROUGH */ case STATION_OILRIG: //(station part) case STATION_BUOY: TileLoop_Water(tile); diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp index 69268ac8e8..6d38bad7ee 100644 --- a/src/terraform_gui.cpp +++ b/src/terraform_gui.cpp @@ -73,7 +73,7 @@ static void GenerateRockyArea(TileIndex end, TileIndex start) switch (GetTileType(tile)) { case MP_TREES: if (GetTreeGround(tile) == TREE_GROUND_SHORE) continue; - /* FALL THROUGH */ + /* FALL THROUGH */ case MP_CLEAR: MakeClear(tile, CLEAR_ROCKS, 3); break; diff --git a/src/tree_cmd.cpp b/src/tree_cmd.cpp index b5b56453d0..6dad8ecae1 100644 --- a/src/tree_cmd.cpp +++ b/src/tree_cmd.cpp @@ -376,7 +376,7 @@ CommandCost CmdPlantTree(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 msg = STR_ERROR_CAN_T_BUILD_ON_WATER; continue; } - /* FALL THROUGH */ + /* FALL THROUGH */ case MP_CLEAR: { if (IsBridgeAbove(tile)) { msg = STR_ERROR_SITE_UNSUITABLE; diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index 613f37f4a0..42bec8fb63 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -516,8 +516,8 @@ struct RefitWindow : public Window { Vehicle *v = Vehicle::Get(this->window_number); BuildRefitList(v, &this->list); this->vscroll.SetCount(this->list.Length()); + /* FALL THROUGH */ } - /* FALL THROUGH */ case 1: // A new cargo has been selected. this->cargo = (this->sel >= 0 && this->sel < (int)this->list.Length()) ? &this->list[this->sel] : NULL; @@ -533,8 +533,9 @@ struct RefitWindow : public Window { this->InvalidateData(1); if (click_count == 1) break; + /* FALL THROUGH */ } - /* FALL THROUGH */ + case VRW_REFITBUTTON: // refit button if (this->cargo != NULL) { const Vehicle *v = Vehicle::Get(this->window_number); diff --git a/src/viewport.cpp b/src/viewport.cpp index ad4051aeb0..4eff0bd15c 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -2216,8 +2216,9 @@ 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 */ } - /* FALL THROUGH */ + case HT_POINT: h0 = TileHeight(start_tile); h1 = TileHeight(end_tile); diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp index 82260738ae..4091c0b9c5 100644 --- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -349,7 +349,8 @@ CommandCost CmdBuildCanal(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 MakeSea(tile); break; } - /* FALL THROUGH */ + /* FALL THROUGH */ + default: MakeCanal(tile, _current_company, Random()); break; @@ -904,7 +905,8 @@ void DoFloodTile(TileIndex target) flooded = true; break; } - /* FALL THROUGH */ + /* FALL THROUGH */ + case MP_CLEAR: if (DoCommand(target, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR).Succeeded()) { MakeShore(target); diff --git a/src/window.cpp b/src/window.cpp index c1198a0bd8..3081bc2688 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -2247,8 +2247,8 @@ static void MouseLoop(MouseClick click, int mousewheel) if (!scrollwheel_scrolling || w == NULL || w->window_class != WC_SMALLMAP) break; /* We try to use the scrollwheel to scroll since we didn't touch any of the buttons. * Simulate a right button click so we can get started. */ + /* FALL THROUGH */ - /* fallthough */ case MC_RIGHT: DispatchRightClickEvent(w, x - w->left, y - w->top); break; case MC_HOVER: DispatchHoverEvent(w, x - w->left, y - w->top); break;