(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

@@ -2502,6 +2502,7 @@ public:
case OT_GOTO_DEPOT:
/* Skip service in depot orders when the train doesn't need service. */
if ((order->GetDepotOrderType() & ODTFB_SERVICE) && !this->v->NeedsServicing()) break;
FALLTHROUGH;
case OT_GOTO_STATION:
case OT_GOTO_WAYPOINT:
this->v->current_order = *order;
@@ -3608,7 +3609,7 @@ static bool TrainApproachingLineEnd(Train *v, bool signal, bool reverse)
* for other directions, it will be 1, 3, 5, ..., 15 */
switch (v->direction) {
case DIR_N : x = ~x + ~y + 25; break;
case DIR_NW: x = y; // FALL THROUGH
case DIR_NW: x = y; FALLTHROUGH;
case DIR_NE: x = ~x + 16; break;
case DIR_E : x = ~x + y + 9; break;
case DIR_SE: x = y; break;