diff --git a/dedicated.c b/dedicated.c index a4a9198ab8..1e00fb0e0b 100644 --- a/dedicated.c +++ b/dedicated.c @@ -312,8 +312,6 @@ static int DedicatedVideoMainLoop(void) } CSleep(1); } - - return ML_QUIT; } diff --git a/depot.h b/depot.h index da621e7320..99541ceeeb 100644 --- a/depot.h +++ b/depot.h @@ -73,13 +73,13 @@ static inline bool IsTileDepotType(TileIndex tile, TransportType type) { case TRANSPORT_RAIL: return IsTileType(tile, MP_RAILWAY) && (_map5[tile] & 0xFC) == 0xC0; - break; + case TRANSPORT_ROAD: return IsTileType(tile, MP_STREET) && (_map5[tile] & 0xF0) == 0x20; - break; + case TRANSPORT_WATER: return IsTileType(tile, MP_WATER) && (_map5[tile] & ~3) == 0x80; - break; + default: assert(0); return false; diff --git a/news_gui.c b/news_gui.c index 0baae7848d..1642fd6828 100644 --- a/news_gui.c +++ b/news_gui.c @@ -194,7 +194,6 @@ static void NewsWindowProc(Window *w, WindowEvent *e) switch (e->message.msg) { case WE_CREATE: w->message.msg = e->message.wparam; break; case WE_DESTROY: w->message.msg = 0; break; - break; } break; diff --git a/vehicle.c b/vehicle.c index 7208e807b9..1c10f12df6 100644 --- a/vehicle.c +++ b/vehicle.c @@ -1750,14 +1750,14 @@ Trackdir GetVehicleTrackdir(const Vehicle* v) return DiagdirToDiagTrackdir((v->direction >> 1) & 3); return TrackDirectionToTrackdir(FIND_FIRST_BIT(v->u.rail.track),v->direction); - break; + case VEH_Ship: if (v->u.ship.state == 0x80) /* Inside a depot? */ /* We'll assume the ship is facing outwards */ return DiagdirToDiagTrackdir(GetDepotDirection(v->tile, TRANSPORT_WATER)); /* Ship in depot */ return TrackDirectionToTrackdir(FIND_FIRST_BIT(v->u.ship.state),v->direction); - break; + case VEH_Road: if (v->u.road.state == 254) /* We'll assume the road vehicle is facing outwards */ return DiagdirToDiagTrackdir(GetDepotDirection(v->tile, TRANSPORT_ROAD)); /* Road vehicle in depot */ @@ -1766,7 +1766,7 @@ Trackdir GetVehicleTrackdir(const Vehicle* v) return DiagdirToDiagTrackdir(GetRoadStationDir(v->tile)); /* Road vehicle in a station */ return DiagdirToDiagTrackdir((v->direction >> 1) & 3); - break; + /* case VEH_Aircraft: case VEH_Special: case VEH_Disaster: */ default: return 0xFF; } diff --git a/viewport.c b/viewport.c index e0e3875427..bc2182496e 100644 --- a/viewport.c +++ b/viewport.c @@ -1996,25 +1996,21 @@ static byte Check2x1AutoRail(int mode) if (fxpy >= 20 && sxpy <= 12) { /*SwapSelection(); DoRailroadTrack(0); */return 3; } if (fxmy < -3 && sxmy > 3) {/* DoRailroadTrack(0); */return 5; } return 1; - break; case 1: if (fxmy > 3 && sxmy < -3) { /*SwapSelection(); DoRailroadTrack(0); */return 4; } if (fxpy <= 12 && sxpy >= 20) { /*DoRailroadTrack(0); */return 2; } return 1; - break; case 2: if (fxmy > 3 && sxmy < -3) { /*DoRailroadTrack(3);*/ return 4; } if (fxpy >= 20 && sxpy <= 12) { /*SwapSelection(); DoRailroadTrack(0); */return 3; } return 0; - break; case 3: if (fxmy < -3 && sxmy > 3) { /*SwapSelection(); DoRailroadTrack(3);*/ return 5; } if (fxpy <= 12 && sxpy >= 20) { /*DoRailroadTrack(0); */return 2; } return 0; - break; } return 0; // avoids compiler warnings