mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 15:41:15 +00:00
(svn r20289) -Codechange: Unify fall through coding style.
This commit is contained in:
parent
7b62e4dc8e
commit
80c43f52e8
@ -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) {
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user