(svn r27893) -Codechange: Use fallthrough attribute. (LordAro)

This commit is contained in:
frosch
2017-08-13 18:38:42 +00:00
parent 34cd504d65
commit a47fb85cd8
60 changed files with 221 additions and 121 deletions

View File

@@ -1229,10 +1229,12 @@ void SmallMapWindow::RebuildColourIndexIfNecessary()
if (tbl->show_on_map && tbl->type == _smallmap_industry_highlight) {
legend_colour = _smallmap_industry_highlight_state ? PC_WHITE : PC_BLACK;
}
/* FALL THROUGH */
FALLTHROUGH;
case SMT_LINKSTATS:
SetDParam(0, tbl->legend);
/* FALL_THROUGH */
FALLTHROUGH;
case SMT_OWNER:
if (this->map_type != SMT_OWNER || tbl->company != INVALID_COMPANY) {
if (this->map_type == SMT_OWNER) SetDParam(0, tbl->company);
@@ -1246,7 +1248,8 @@ void SmallMapWindow::RebuildColourIndexIfNecessary()
}
break;
}
/* FALL_THROUGH */
FALLTHROUGH;
default:
if (this->map_type == SMT_CONTOUR) SetDParam(0, tbl->height * TILE_HEIGHT_STEP);
/* Anything that is not an industry or a company is using normal process */
@@ -1465,7 +1468,6 @@ int SmallMapWindow::GetPositionOnLegend(Point pt)
break;
case WID_SM_ENABLE_ALL:
/* FALL THROUGH */
case WID_SM_DISABLE_ALL: {
LegendAndColour *tbl = NULL;
switch (this->map_type) {