mirror of https://github.com/OpenTTD/OpenTTD
Fix b4b98e5165: Use FALLTHROUGH attribute with correct indentation.
parent
3f40cd505d
commit
cfb8092397
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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? */
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue