(svn r20239) -Doc: Give a common name to all fall throughs (FALL THROUGH).

This commit is contained in:
terkhen 2010-07-29 14:26:28 +00:00
parent 04242e19cf
commit 88ca183191
30 changed files with 52 additions and 52 deletions

View File

@ -298,7 +298,7 @@ AIInfo *AIScanner::FindInfo(const char *nameParam, int versionParam, bool force_
*e = '\0'; *e = '\0';
e++; e++;
versionParam = atoi(e); versionParam = atoi(e);
/* Fall-through, like we were calling this function with a version */ /* FALL THROUGH, like we were calling this function with a version. */
} }
if (force_exact_match) { if (force_exact_match) {

View File

@ -202,8 +202,8 @@ struct CheatWindow : Window {
/* Set correct string for switch climate cheat */ /* Set correct string for switch climate cheat */
case STR_CHEAT_SWITCH_CLIMATE: val += STR_CHEAT_SWITCH_CLIMATE_TEMPERATE_LANDSCAPE; case STR_CHEAT_SWITCH_CLIMATE: val += STR_CHEAT_SWITCH_CLIMATE_TEMPERATE_LANDSCAPE;
/* FALL THROUGH */
/* Fallthrough */
default: SetDParam(0, val); default: SetDParam(0, val);
} }
} break; } break;

View File

@ -327,7 +327,7 @@ struct CompanyFinancesWindow : Window {
case CFW_EXPS_PRICE2: case CFW_EXPS_PRICE2:
case CFW_EXPS_PRICE3: case CFW_EXPS_PRICE3:
size->height = _expenses_list_types[type].GetHeight(); size->height = _expenses_list_types[type].GetHeight();
/* Fall through */ /* FALL THROUGH */
case CFW_BALANCE_VALUE: case CFW_BALANCE_VALUE:
case CFW_LOAN_VALUE: case CFW_LOAN_VALUE:
case CFW_TOTAL_VALUE: case CFW_TOTAL_VALUE:
@ -640,7 +640,7 @@ public:
size->width = 0; size->width = 0;
break; break;
} }
/* Fall through */ /* FALL THROUGH */
case SCLW_WIDGET_PRI_COL_DROPDOWN: { case SCLW_WIDGET_PRI_COL_DROPDOWN: {
for (const StringID *id = _colour_dropdown; id != endof(_colour_dropdown); id++) { for (const StringID *id = _colour_dropdown; id != endof(_colour_dropdown); id++) {
size->width = max(size->width, GetStringBoundingBox(*id).width + 34); size->width = max(size->width, GetStringBoundingBox(*id).width + 34);
@ -1405,7 +1405,7 @@ public:
/* OK button */ /* OK button */
case SCMFW_WIDGET_ACCEPT: case SCMFW_WIDGET_ACCEPT:
DoCommandP(0, 0, this->face, CMD_SET_COMPANY_MANAGER_FACE); DoCommandP(0, 0, this->face, CMD_SET_COMPANY_MANAGER_FACE);
/* Fall-Through */ /* FALL THROUGH */
/* Cancel button */ /* Cancel button */
case SCMFW_WIDGET_CANCEL: case SCMFW_WIDGET_CANCEL:

View File

@ -439,7 +439,7 @@ void IConsoleCmdExec(const char *cmdstr)
tokenstream[tstream_i++] = *++cmdptr; tokenstream[tstream_i++] = *++cmdptr;
break; break;
} }
/* fallthrough */ /* FALL THROUGH */
default: // Normal character default: // Normal character
tokenstream[tstream_i++] = *cmdptr; tokenstream[tstream_i++] = *cmdptr;

View File

@ -674,7 +674,7 @@ void ScanFile(const char *filename, const char *ext, bool header, bool verbose)
free((void*)h); free((void*)h);
} }
} }
/* Fall through */ /* FALL THROUGH */
default: break; default: break;
} }
break; break;
@ -796,7 +796,7 @@ void ScanFile(const char *filename, const char *ext, bool header, bool verbose)
break; break;
} }
if (verbose) fprintf(stderr, "\n"); if (verbose) fprintf(stderr, "\n");
/* Fall through */ /* FALL THROUGH */
default: default:
/* Ignore the rest of the garbage on this line */ /* Ignore the rest of the garbage on this line */
while (lexer.GetToken() != TOKEN_EOL && lexer.GetToken() != TOKEN_END) lexer.Lex(); while (lexer.GetToken() != TOKEN_EOL && lexer.GetToken() != TOKEN_END) lexer.Lex();

View File

@ -111,7 +111,7 @@ struct EnginePreviewWindow : Window {
switch (widget) { switch (widget) {
case EPW_YES: case EPW_YES:
DoCommandP(0, this->window_number, 0, CMD_WANT_ENGINE_PREVIEW); DoCommandP(0, this->window_number, 0, CMD_WANT_ENGINE_PREVIEW);
/* Fallthrough */ /* FALL THROUGH */
case EPW_NO: case EPW_NO:
delete this; delete this;
break; break;

View File

@ -100,7 +100,7 @@ const char *FiosBrowseTo(const FiosItem *item)
#elif defined(WIN32) || defined(__OS2__) #elif defined(WIN32) || defined(__OS2__)
snprintf(path, MAX_PATH, "%c:" PATHSEP, item->title[0]); snprintf(path, MAX_PATH, "%c:" PATHSEP, item->title[0]);
#endif #endif
/* Fallthrough */ /* FALL THROUGH */
case FIOS_TYPE_INVALID: case FIOS_TYPE_INVALID:
break; break;

View File

@ -1340,10 +1340,10 @@ struct QueryStringWindow : public QueryStringBaseWindow
switch (widget) { switch (widget) {
case QUERY_STR_WIDGET_DEFAULT: case QUERY_STR_WIDGET_DEFAULT:
this->text.buf[0] = '\0'; this->text.buf[0] = '\0';
/* Fallthrough */ /* FALL THROUGH */
case QUERY_STR_WIDGET_OK: case QUERY_STR_WIDGET_OK:
this->OnOk(); this->OnOk();
/* Fallthrough */ /* FALL THROUGH */
case QUERY_STR_WIDGET_CANCEL: case QUERY_STR_WIDGET_CANCEL:
delete this; delete this;
break; break;
@ -1532,7 +1532,7 @@ struct QueryWindow : public Window {
this->proc(this->parent, true); this->proc(this->parent, true);
this->proc = NULL; this->proc = NULL;
} }
/* Fallthrough */ /* FALL THROUGH */
case WKC_ESC: case WKC_ESC:
delete this; delete this;
return ES_HANDLED; return ES_HANDLED;

View File

@ -99,7 +99,7 @@ void MusicDriver_ExtMidi::DoPlay()
case -1: case -1:
DEBUG(driver, 0, "extmidi: couldn't fork: %s", strerror(errno)); DEBUG(driver, 0, "extmidi: couldn't fork: %s", strerror(errno));
/* FALLTHROUGH */ /* FALL THROUGH */
default: default:
this->song[0] = '\0'; this->song[0] = '\0';

View File

@ -240,7 +240,7 @@ void MusicDriver_QtMidi::Stop()
case QT_STATE_PLAY: case QT_STATE_PLAY:
StopSong(); StopSong();
/* Fall-through */ /* FALL THROUGH */
case QT_STATE_STOP: case QT_STATE_STOP:
DisposeMovie(_quicktime_movie); DisposeMovie(_quicktime_movie);
@ -265,13 +265,13 @@ void MusicDriver_QtMidi::PlaySong(const char *filename)
case QT_STATE_PLAY: case QT_STATE_PLAY:
StopSong(); StopSong();
DEBUG(driver, 3, "qtmidi: previous tune stopped"); DEBUG(driver, 3, "qtmidi: previous tune stopped");
/* Fall-through -- no break needed. */ /* FALL THROUGH */
case QT_STATE_STOP: case QT_STATE_STOP:
DisposeMovie(_quicktime_movie); DisposeMovie(_quicktime_movie);
DEBUG(driver, 3, "qtmidi: previous tune disposed"); DEBUG(driver, 3, "qtmidi: previous tune disposed");
_quicktime_state = QT_STATE_IDLE; _quicktime_state = QT_STATE_IDLE;
/* Fall-through -- no break needed. */ /* FALL THROUGH */
case QT_STATE_IDLE: case QT_STATE_IDLE:
LoadMovieForMIDIFile(filename, &_quicktime_movie); LoadMovieForMIDIFile(filename, &_quicktime_movie);
@ -292,7 +292,7 @@ void MusicDriver_QtMidi::StopSong()
switch (_quicktime_state) { switch (_quicktime_state) {
case QT_STATE_IDLE: case QT_STATE_IDLE:
/* Fall-through -- no break needed. */ /* FALL THROUGH */
case QT_STATE_STOP: case QT_STATE_STOP:
DEBUG(driver, 3, "qtmidi: stop requested, but already idle"); DEBUG(driver, 3, "qtmidi: stop requested, but already idle");

View File

@ -246,16 +246,16 @@ void NetworkUDPSocketHandler::Recv_NetworkGameInfo(Packet *p, NetworkGameInfo *i
*dst = c; *dst = c;
dst = &c->next; dst = &c->next;
} }
} // Fallthrough } // FALL THROUGH
case 3: case 3:
info->game_date = Clamp(p->Recv_uint32(), 0, MAX_DATE); info->game_date = Clamp(p->Recv_uint32(), 0, MAX_DATE);
info->start_date = Clamp(p->Recv_uint32(), 0, MAX_DATE); info->start_date = Clamp(p->Recv_uint32(), 0, MAX_DATE);
/* Fallthrough */ /* FALL THROUGH */
case 2: case 2:
info->companies_max = p->Recv_uint8 (); info->companies_max = p->Recv_uint8 ();
info->companies_on = p->Recv_uint8 (); info->companies_on = p->Recv_uint8 ();
info->spectators_max = p->Recv_uint8 (); info->spectators_max = p->Recv_uint8 ();
/* Fallthrough */ /* FALL THROUGH */
case 1: case 1:
p->Recv_string(info->server_name, sizeof(info->server_name)); p->Recv_string(info->server_name, sizeof(info->server_name));
p->Recv_string(info->server_revision, sizeof(info->server_revision)); p->Recv_string(info->server_revision, sizeof(info->server_revision));

View File

@ -484,7 +484,7 @@ struct NetworkChatWindow : public QueryStringBaseWindow {
switch (widget) { switch (widget) {
/* Send */ /* Send */
case NWCW_SENDBUTTON: SendChat(this->text.buf, this->dtype, this->dest); case NWCW_SENDBUTTON: SendChat(this->text.buf, this->dtype, this->dest);
/* FALLTHROUGH */ /* FALL THROUGH */
case NWCW_CLOSE: /* Cancel */ delete this; break; case NWCW_CLOSE: /* Cancel */ delete this; break;
} }
} }
@ -510,7 +510,7 @@ struct NetworkChatWindow : public QueryStringBaseWindow {
} break; } break;
case HEBR_CONFIRM: case HEBR_CONFIRM:
SendChat(this->text.buf, this->dtype, this->dest); SendChat(this->text.buf, this->dtype, this->dest);
/* FALLTHROUGH */ /* FALL THROUGH */
case HEBR_CANCEL: delete this; break; case HEBR_CANCEL: delete this; break;
case HEBR_NOT_FOCUSED: break; case HEBR_NOT_FOCUSED: break;
} }

View File

@ -782,7 +782,7 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_CHAT)
/* For speaking to company or giving money, we need the company-name */ /* For speaking to company or giving money, we need the company-name */
case NETWORK_ACTION_GIVE_MONEY: case NETWORK_ACTION_GIVE_MONEY:
if (!Company::IsValidID(ci_to->client_playas)) return NETWORK_RECV_STATUS_OKAY; if (!Company::IsValidID(ci_to->client_playas)) return NETWORK_RECV_STATUS_OKAY;
/* fallthrough */ /* FALL THROUGH */
case NETWORK_ACTION_CHAT_COMPANY: { case NETWORK_ACTION_CHAT_COMPANY: {
StringID str = Company::IsValidID(ci_to->client_playas) ? STR_COMPANY_NAME : STR_NETWORK_SPECTATORS; StringID str = Company::IsValidID(ci_to->client_playas) ? STR_COMPANY_NAME : STR_NETWORK_SPECTATORS;
SetDParam(0, ci_to->client_playas); SetDParam(0, ci_to->client_playas);

View File

@ -688,7 +688,7 @@ public:
} }
return ES_HANDLED; return ES_HANDLED;
} }
/* Fall through when pressing space is pressed and filter isn't focused */ /* FALL THROUGH, space is pressed and filter isn't focused. */
default: { default: {
/* Handle editbox input */ /* Handle editbox input */

View File

@ -2158,7 +2158,7 @@ struct NetworkJoinStatusWindow : Window {
SetDParam(0, _network_join_bytes); SetDParam(0, _network_join_bytes);
SetDParam(1, _network_join_bytes_total); SetDParam(1, _network_join_bytes_total);
DrawString(r.left + 2, r.right - 2, r.top + 20 + FONT_HEIGHT_NORMAL, STR_NETWORK_CONNECTING_DOWNLOADING, TC_FROMSTRING, SA_HOR_CENTER); DrawString(r.left + 2, r.right - 2, r.top + 20 + FONT_HEIGHT_NORMAL, STR_NETWORK_CONNECTING_DOWNLOADING, TC_FROMSTRING, SA_HOR_CENTER);
/* Fallthrough */ /* FALL THROUGH */
default: // Waiting is 15%, so the resting receivement of map is maximum 70% default: // Waiting is 15%, so the resting receivement of map is maximum 70%
progress = 15 + _network_join_bytes * (100 - 15) / _network_join_bytes_total; progress = 15 + _network_join_bytes * (100 - 15) / _network_join_bytes_total;
} }

View File

@ -1153,7 +1153,7 @@ void NetworkServerSendChat(NetworkAction action, DestType desttype, int dest, co
break; break;
default: default:
DEBUG(net, 0, "[server] received unknown chat destination type %d. Doing broadcast instead", desttype); DEBUG(net, 0, "[server] received unknown chat destination type %d. Doing broadcast instead", desttype);
/* fall-through to next case */ /* FALL THROUGH */
case DESTTYPE_BROADCAST: case DESTTYPE_BROADCAST:
FOR_ALL_CLIENT_SOCKETS(cs) { FOR_ALL_CLIENT_SOCKETS(cs) {
SEND_COMMAND(PACKET_SERVER_CHAT)(cs, action, from_id, false, msg, data); SEND_COMMAND(PACKET_SERVER_CHAT)(cs, action, from_id, false, msg, data);
@ -1185,7 +1185,7 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_CHAT)
switch (action) { switch (action) {
case NETWORK_ACTION_GIVE_MONEY: case NETWORK_ACTION_GIVE_MONEY:
if (!Company::IsValidID(ci->client_playas)) break; if (!Company::IsValidID(ci->client_playas)) break;
/* Fall-through */ /* FALL THROUGH */
case NETWORK_ACTION_CHAT: case NETWORK_ACTION_CHAT:
case NETWORK_ACTION_CHAT_CLIENT: case NETWORK_ACTION_CHAT_CLIENT:
case NETWORK_ACTION_CHAT_COMPANY: case NETWORK_ACTION_CHAT_COMPANY:

View File

@ -3028,7 +3028,7 @@ static bool HandleChangeInfoResult(const char *caller, ChangeInfoResult cir, uin
case CIR_UNKNOWN: case CIR_UNKNOWN:
grfmsg(0, "%s: Unknown property 0x%02X of feature 0x%02X, disabling", caller, property, feature); grfmsg(0, "%s: Unknown property 0x%02X of feature 0x%02X, disabling", caller, property, feature);
/* Fall through */ /* FALL THROUGH */
case CIR_INVALID_ID: case CIR_INVALID_ID:
/* No debug message for an invalid ID, as it has already been output */ /* No debug message for an invalid ID, as it has already been output */

View File

@ -495,7 +495,7 @@ struct NewGRFWindow : public QueryStringBaseWindow {
this->InvalidateData(); this->InvalidateData();
if (click_count == 1) break; if (click_count == 1) break;
} }
/* Fall through with double click. */ /* FALL THROUGH, with double click. */
case SNGRFS_REMOVE: { // Remove GRF case SNGRFS_REMOVE: { // Remove GRF
if (this->active_sel == NULL || !this->editable) break; if (this->active_sel == NULL || !this->editable) break;
@ -535,7 +535,7 @@ struct NewGRFWindow : public QueryStringBaseWindow {
this->DeleteChildWindows(WC_QUERY_STRING); // Remove the parameter query window this->DeleteChildWindows(WC_QUERY_STRING); // Remove the parameter query window
if (click_count == 1) break; if (click_count == 1) break;
} }
/* Fall through with double click. */ /* FALL THROUGH, with double click. */
case SNGRFS_ADD: { case SNGRFS_ADD: {
if (this->avail_sel == NULL || !this->editable) break; if (this->avail_sel == NULL || !this->editable) break;
@ -727,13 +727,13 @@ struct NewGRFWindow : public QueryStringBaseWindow {
delete c; delete c;
} }
/* Fall through. */ /* FALL THROUGH */
case 4: case 4:
this->avails.ForceRebuild(); this->avails.ForceRebuild();
/* Fall through. */ /* FALL THROUGH */
case 2: case 2:
this->preset = -1; this->preset = -1;
/* Fall through */ /* FALL THROUGH */
case 3: { case 3: {
int i = 0; int i = 0;
for (const GRFConfig *c = this->actives; c != NULL; c = c->next, i++) {} for (const GRFConfig *c = this->actives; c != NULL; c = c->next, i++) {}

View File

@ -123,7 +123,7 @@ static uint32 GetCountAndDistanceOfClosestInstance(byte param_setID, byte layout
case 0xFFFFFFFF: // current grf case 0xFFFFFFFF: // current grf
GrfID = GetIndustrySpec(current->type)->grf_prop.grffile->grfid; GrfID = GetIndustrySpec(current->type)->grf_prop.grffile->grfid;
/* Fall through */ /* FALL THROUGH */
default: // use the grfid specified in register 100h default: // use the grfid specified in register 100h
SetBit(param_setID, 7); // bit 7 means it is not an old type SetBit(param_setID, 7); // bit 7 means it is not an old type

View File

@ -451,7 +451,7 @@ CommandCost CmdBuildSingleRail(TileIndex tile, DoCommandFlag flags, uint32 p1, u
if (IsLevelCrossing(tile) && GetCrossingRailBits(tile) == trackbit) { if (IsLevelCrossing(tile) && GetCrossingRailBits(tile) == trackbit) {
return_cmd_error(STR_ERROR_ALREADY_BUILT); return_cmd_error(STR_ERROR_ALREADY_BUILT);
} }
/* FALLTHROUGH */ /* FALL THROUGH */
} }
default: { default: {

View File

@ -152,7 +152,7 @@ static void ConvertTownOwner()
if (GB(_m[tile].m5, 4, 2) == ROAD_TILE_CROSSING && HasBit(_m[tile].m3, 7)) { if (GB(_m[tile].m5, 4, 2) == ROAD_TILE_CROSSING && HasBit(_m[tile].m3, 7)) {
_m[tile].m3 = OWNER_TOWN; _m[tile].m3 = OWNER_TOWN;
} }
/* FALLTHROUGH */ /* FALL THROUGH */
case MP_TUNNELBRIDGE: case MP_TUNNELBRIDGE:
if (GetTileOwner(tile) & 0x80) SetTileOwner(tile, OWNER_TOWN); if (GetTileOwner(tile) & 0x80) SetTileOwner(tile, OWNER_TOWN);

View File

@ -501,7 +501,7 @@ static SigSegState UpdateSignalsInBuffer(Owner owner)
_tbdset.Add(tile, INVALID_DIAGDIR); // start from depot inside _tbdset.Add(tile, INVALID_DIAGDIR); // start from depot inside
break; break;
} }
/* FALLTHROUGH */ /* FALL THROUGH */
case MP_STATION: case MP_STATION:
case MP_ROAD: case MP_ROAD:
if ((TrackStatusToTrackBits(GetTileTrackStatus(tile, TRANSPORT_RAIL, 0)) & _enterdir_to_trackbits[dir]) != TRACK_BIT_NONE) { if ((TrackStatusToTrackBits(GetTileTrackStatus(tile, TRANSPORT_RAIL, 0)) & _enterdir_to_trackbits[dir]) != TRACK_BIT_NONE) {
@ -510,7 +510,7 @@ static SigSegState UpdateSignalsInBuffer(Owner owner)
_tbdset.Add(tile + TileOffsByDiagDir(dir), ReverseDiagDir(dir)); _tbdset.Add(tile + TileOffsByDiagDir(dir), ReverseDiagDir(dir));
break; break;
} }
/* FALLTHROUGH */ /* FALL THROUGH */
default: default:
/* jump to next tile */ /* jump to next tile */
tile = tile + TileOffsByDiagDir(dir); tile = tile + TileOffsByDiagDir(dir);

View File

@ -551,7 +551,7 @@ static void *HandleInvalidSpriteRequest(SpriteID sprite, SpriteType requested, S
switch (requested) { switch (requested) {
case ST_NORMAL: case ST_NORMAL:
if (sprite == SPR_IMG_QUERY) usererror("Uhm, would you be so kind not to load a NewGRF that makes the 'query' sprite a non-normal sprite?"); if (sprite == SPR_IMG_QUERY) usererror("Uhm, would you be so kind not to load a NewGRF that makes the 'query' sprite a non-normal sprite?");
/* FALLTHROUGH */ /* FALL THROUGH */
case ST_FONT: case ST_FONT:
return GetRawSprite(SPR_IMG_QUERY, ST_NORMAL); return GetRawSprite(SPR_IMG_QUERY, ST_NORMAL);
case ST_RECOLOUR: case ST_RECOLOUR:

View File

@ -213,7 +213,7 @@ struct TimetableWindow : Window {
this->deparr_time_width = GetStringBoundingBox(STR_JUST_DATE_TINY).width; this->deparr_time_width = GetStringBoundingBox(STR_JUST_DATE_TINY).width;
this->deparr_abbr_width = max(GetStringBoundingBox(STR_TIMETABLE_ARRIVAL_ABBREVIATION).width, GetStringBoundingBox(STR_TIMETABLE_DEPARTURE_ABBREVIATION).width); this->deparr_abbr_width = max(GetStringBoundingBox(STR_TIMETABLE_ARRIVAL_ABBREVIATION).width, GetStringBoundingBox(STR_TIMETABLE_DEPARTURE_ABBREVIATION).width);
size->width = WD_FRAMERECT_LEFT + this->deparr_abbr_width + 10 + this->deparr_time_width + WD_FRAMERECT_RIGHT; size->width = WD_FRAMERECT_LEFT + this->deparr_abbr_width + 10 + this->deparr_time_width + WD_FRAMERECT_RIGHT;
/* fall through */ /* FALL THROUGH */
case TTV_ARRIVAL_DEPARTURE_SELECTION: case TTV_ARRIVAL_DEPARTURE_SELECTION:
case TTV_TIMETABLE_PANEL: case TTV_TIMETABLE_PANEL:
resize->height = FONT_HEIGHT_NORMAL; resize->height = FONT_HEIGHT_NORMAL;

View File

@ -267,7 +267,7 @@ public:
this->sel_index = y; this->sel_index = y;
this->SetDirty(); this->SetDirty();
} }
/* Fall through to clicking in case we are double-clicked */ /* FALL THROUGH, when double-clicking. */
if (click_count == 1 || y < 0) break; if (click_count == 1 || y < 0) break;
} }

View File

@ -3639,7 +3639,7 @@ static bool TrainApproachingLineEnd(Train *v, bool signal)
* for other directions, it will be 1, 3, 5, ..., 15 */ * for other directions, it will be 1, 3, 5, ..., 15 */
switch (v->direction) { switch (v->direction) {
case DIR_N : x = ~x + ~y + 25; break; case DIR_N : x = ~x + ~y + 25; break;
case DIR_NW: x = y; // FALLTHROUGH case DIR_NW: x = y; // FALL THROUGH
case DIR_NE: x = ~x + 16; break; case DIR_NE: x = ~x + 16; break;
case DIR_E : x = ~x + y + 9; break; case DIR_E : x = ~x + y + 9; break;
case DIR_SE: x = y; break; case DIR_SE: x = y; break;

View File

@ -516,7 +516,7 @@ struct RefitWindow : public Window {
BuildRefitList(v, &this->list); BuildRefitList(v, &this->list);
this->vscroll.SetCount(this->list.Length()); this->vscroll.SetCount(this->list.Length());
} }
/* FALLTHROUGH */ /* FALL THROUGH */
case 1: // A new cargo has been selected. case 1: // A new cargo has been selected.
this->cargo = (this->sel >= 0 && this->sel < (int)this->list.Length()) ? &this->list[this->sel] : NULL; this->cargo = (this->sel >= 0 && this->sel < (int)this->list.Length()) ? &this->list[this->sel] : NULL;
@ -1633,7 +1633,7 @@ struct VehicleDetailsWindow : Window {
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y, STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED_MAX_TE); DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y, STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED_MAX_TE);
break; break;
} }
/* Fallthrough */ /* FALL THROUGH */
case VEH_SHIP: case VEH_SHIP:
case VEH_AIRCRAFT: case VEH_AIRCRAFT:
SetDParam(0, v->GetDisplayMaxSpeed()); SetDParam(0, v->GetDisplayMaxSpeed());
@ -2150,7 +2150,7 @@ public:
str = STR_VEHICLE_STATUS_LEAVING; str = STR_VEHICLE_STATUS_LEAVING;
break; break;
} }
/* fall-through if aircraft. Does this even happen? */ /* FALL THROUGH, if aircraft. Does this even happen? */
default: default:
if (v->GetNumOrders() == 0) { if (v->GetNumOrders() == 0) {

View File

@ -364,7 +364,7 @@ static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
case WM_PALETTECHANGED: case WM_PALETTECHANGED:
if ((HWND)wParam == hwnd) return 0; if ((HWND)wParam == hwnd) return 0;
/* FALLTHROUGH */ /* FALL THROUGH */
case WM_QUERYNEWPALETTE: { case WM_QUERYNEWPALETTE: {
HDC hDC = GetWindowDC(hwnd); HDC hDC = GetWindowDC(hwnd);

View File

@ -2200,7 +2200,7 @@ static int CalcHeightdiff(HighLightStyle style, uint distance, TileIndex start_t
start_tile = TILE_ADD(start_tile, ToTileIndexDiff(heightdiff_area_by_dir[style_t])); 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])); end_tile = TILE_ADD(end_tile, ToTileIndexDiff(heightdiff_area_by_dir[2 + style_t]));
} }
/* Fallthrough */ /* FALL THROUGH */
case HT_POINT: case HT_POINT:
h0 = TileHeight(start_tile); h0 = TileHeight(start_tile);
h1 = TileHeight(end_tile); h1 = TileHeight(end_tile);
@ -2542,7 +2542,7 @@ void VpSelectTilesWithMethod(int x, int y, ViewportPlaceMethod method)
case VPM_X_LIMITED: // Drag in X direction (limited size). case VPM_X_LIMITED: // Drag in X direction (limited size).
limit = (_thd.sizelimit - 1) * TILE_SIZE; limit = (_thd.sizelimit - 1) * TILE_SIZE;
/* Fallthrough. */ /* FALL THROUGH */
case VPM_FIX_X: // drag in Y direction case VPM_FIX_X: // drag in Y direction
x = sx; x = sx;
@ -2551,7 +2551,7 @@ void VpSelectTilesWithMethod(int x, int y, ViewportPlaceMethod method)
case VPM_Y_LIMITED: // Drag in Y direction (limited size). case VPM_Y_LIMITED: // Drag in Y direction (limited size).
limit = (_thd.sizelimit - 1) * TILE_SIZE; limit = (_thd.sizelimit - 1) * TILE_SIZE;
/* Fallthrough. */ /* FALL THROUGH */
case VPM_FIX_Y: // drag in X direction case VPM_FIX_Y: // drag in X direction
y = sy; y = sy;
@ -2588,7 +2588,7 @@ calc_heightdiff_single_direction:;
limit = (_thd.sizelimit - 1) * TILE_SIZE; limit = (_thd.sizelimit - 1) * TILE_SIZE;
x = sx + Clamp(x - sx, -limit, limit); x = sx + Clamp(x - sx, -limit, limit);
y = sy + Clamp(y - sy, -limit, limit); y = sy + Clamp(y - sy, -limit, limit);
/* Fallthrough. */ /* FALL THROUGH */
case VPM_X_AND_Y: { // drag an X by Y area case VPM_X_AND_Y: { // drag an X by Y area
if (_settings_client.gui.measure_tooltip) { if (_settings_client.gui.measure_tooltip) {

View File

@ -1861,7 +1861,7 @@ void NWidgetLeaf::SetupSmallestSize(Window *w, bool init_array)
} }
case WWT_EDITBOX: case WWT_EDITBOX:
size.height = max(size.height, GetStringBoundingBox("_").height + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM); size.height = max(size.height, GetStringBoundingBox("_").height + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM);
/* fall through */ /* FALL THROUGH */
case WWT_PUSHBTN: { case WWT_PUSHBTN: {
static const Dimension extra = {WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM}; static const Dimension extra = {WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM};
padding = &extra; padding = &extra;