(svn r20289) -Codechange: Unify fall through coding style.

replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
terkhen 14 years ago
parent 7b62e4dc8e
commit 80c43f52e8

@ -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 */
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. */
}
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. */
}
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);

@ -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 */
}
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 */
}
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 */
}
case HT_POINT:
h0 = TileHeight(start_tile);
h1 = TileHeight(end_tile);

@ -350,6 +350,7 @@ CommandCost CmdBuildCanal(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
break;
}
/* FALL THROUGH */
default:
MakeCanal(tile, _current_company, Random());
break;
@ -905,6 +906,7 @@ void DoFloodTile(TileIndex target)
break;
}
/* 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…
Cancel
Save