diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -775,7 +775,8 @@ static int CDECL VehicleLengthSorter(con const RoadVehicle *u; for (u = RoadVehicle::From(*a); u != NULL; u = u->Next()) r += u->rcache.cached_veh_length; for (u = RoadVehicle::From(*b); u != NULL; u = u->Next()) r -= u->rcache.cached_veh_length; - } break; + break; + } default: NOT_REACHED(); } @@ -1149,7 +1150,8 @@ public: break; default: NOT_REACHED(); } - } break; + break; + } } } @@ -1220,7 +1222,8 @@ public: const Vehicle *v = this->vehicles[id_v]; ShowVehicleViewWindow(v); - } break; + break; + } case VLW_WIDGET_AVAILABLE_VEHICLES: ShowBuildVehicleWindow(INVALID_TILE, this->vehicle_type); @@ -1523,7 +1526,8 @@ struct VehicleDetailsWindow : Window { SetDParam(0, STR_VEHICLE_INFO_AGE); dim = maxdim(dim, GetStringBoundingBox(STR_VEHICLE_INFO_AGE_RUNNING_COST_YR)); size->width = dim.width + WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT; - } break; + break; + } case VLD_WIDGET_MIDDLE_DETAILS: { const Vehicle *v = Vehicle::Get(this->window_number); @@ -1683,7 +1687,8 @@ struct VehicleDetailsWindow : Window { DrawVehicleImage(v, sprite_left + WD_FRAMERECT_LEFT, sprite_right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, INVALID_VEHICLE, 0); } DrawVehicleDetails(v, text_left + WD_FRAMERECT_LEFT, text_right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, this->vscroll.GetPosition(), this->vscroll.GetCapacity(), this->tab); - } break; + break; + } case VLD_WIDGET_SERVICING_INTERVAL: /* Draw service interval text */ @@ -1724,7 +1729,8 @@ struct VehicleDetailsWindow : Window { SetDParam(0, v->index); ShowQueryString(STR_VEHICLE_NAME, STR_QUERY_RENAME_TRAIN_CAPTION + v->type, MAX_LENGTH_VEHICLE_NAME_BYTES, MAX_LENGTH_VEHICLE_NAME_PIXELS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT); - } break; + break; + } case VLD_WIDGET_INCREASE_SERVICING_INTERVAL: // increase int case VLD_WIDGET_DECREASE_SERVICING_INTERVAL: { // decrease int @@ -1736,7 +1742,8 @@ struct VehicleDetailsWindow : Window { if (mod == v->service_interval) return; DoCommandP(v->tile, v->index, mod, CMD_CHANGE_SERVICE_INT | CMD_MSG(STR_ERROR_CAN_T_CHANGE_SERVICING)); - } break; + break; + } case VLD_WIDGET_DETAILS_CARGO_CARRIED: case VLD_WIDGET_DETAILS_TRAIN_VEHICLES: @@ -2054,7 +2061,8 @@ public: if (v->type != VEH_TRAIN) { size->height = 0; size->width = 0; - } break; + break; + } case VVW_WIDGET_VIEWPORT: size->width = VV_INITIAL_VIEWPORT_WIDTH; @@ -2123,7 +2131,8 @@ public: SetDParam(0, v->current_order.GetDestination()); SetDParam(1, v->GetDisplaySpeed()); str = STR_VEHICLE_STATUS_HEADING_FOR_STATION + _settings_client.gui.vehicle_speed; - } break; + break; + } case OT_GOTO_DEPOT: { SetDParam(0, v->type); @@ -2134,7 +2143,8 @@ public: } else { str = STR_VEHICLE_STATUS_HEADING_FOR_DEPOT_SERVICE + _settings_client.gui.vehicle_speed; } - } break; + break; + } case OT_LOADING: str = STR_VEHICLE_STATUS_LOADING_UNLOADING; @@ -2194,7 +2204,8 @@ public: } else { ScrollMainWindowTo(v->x_pos, v->y_pos, v->z_pos); } - } break; + break; + } case VVW_WIDGET_GOTO_DEPOT: // goto hangar DoCommandP(v->tile, v->index, _ctrl_pressed ? DEPOT_SERVICE : 0, GetCmdSendToDepot(v));