From cc2b51320f3d375a6ac46e0a5d3c591c5c2b507f Mon Sep 17 00:00:00 2001 From: tron Date: Wed, 14 Dec 2005 06:49:54 +0000 Subject: (svn r3300) Remove unreachable code - in this case some duplicate breaks --- aircraft_gui.c | 4 +--- main_gui.c | 6 +++--- players.c | 3 ++- roadveh_gui.c | 4 +--- ship_gui.c | 4 +--- 5 files changed, 8 insertions(+), 13 deletions(-) diff --git a/aircraft_gui.c b/aircraft_gui.c index 740b84528..1e071caab 100644 --- a/aircraft_gui.c +++ b/aircraft_gui.c @@ -833,7 +833,7 @@ static void AircraftDepotWndProc(Window *w, WindowEvent *e) DeleteWindowById(WC_BUILD_VEHICLE, w->window_number); break; - case WE_DRAGDROP: { + case WE_DRAGDROP: switch(e->click.widget) { case 5: { Vehicle *v; @@ -871,8 +871,6 @@ static void AircraftDepotWndProc(Window *w, WindowEvent *e) SetWindowDirty(w); } break; - } - break; case WE_RESIZE: w->vscroll.cap += e->sizing.diff.y / 24; diff --git a/main_gui.c b/main_gui.c index 7adf19c1c..89f2611bf 100644 --- a/main_gui.c +++ b/main_gui.c @@ -2090,7 +2090,7 @@ static void ScenEditToolbarWndProc(Window *w, WindowEvent *e) _scen_toolbar_button_procs[e->click.widget](w); } break; - case WE_KEYPRESS: { + case WE_KEYPRESS: switch (e->keypress.keycode) { case WKC_F1: ToolbarPauseClick(w); break; case WKC_F2: ShowGameOptions(); break; @@ -2106,8 +2106,8 @@ static void ScenEditToolbarWndProc(Window *w, WindowEvent *e) case WKC_CTRL | 'S': _make_screenshot = 1; break; case WKC_CTRL | 'G': _make_screenshot = 2; break; case 'L': ShowEditorTerraformToolBar(); break; - } break; - } break; + } + break; case WE_PLACE_OBJ: { _place_proc(e->place.tile); diff --git a/players.c b/players.c index de26ff4ac..307b8db22 100644 --- a/players.c +++ b/players.c @@ -733,7 +733,8 @@ int32 CmdReplaceVehicle(int x, int y, uint32 flags, uint32 p1, uint32 p2) } else { return RemoveEngineReplacement(p, old_engine_type, flags); } - } break; + } + case 4: if (flags & DC_EXEC) { p->engine_renew = (bool)GB(p1, 15, 1); diff --git a/roadveh_gui.c b/roadveh_gui.c index 219a07104..729b99cd5 100644 --- a/roadveh_gui.c +++ b/roadveh_gui.c @@ -738,7 +738,7 @@ static void RoadDepotWndProc(Window *w, WindowEvent *e) DeleteWindowById(WC_BUILD_VEHICLE, w->window_number); break; - case WE_DRAGDROP: { + case WE_DRAGDROP: switch(e->click.widget) { case 5: { Vehicle *v; @@ -776,8 +776,6 @@ static void RoadDepotWndProc(Window *w, WindowEvent *e) SetWindowDirty(w); } break; - } - break; case WE_RESIZE: { /* Update the scroll + matrix */ diff --git a/ship_gui.c b/ship_gui.c index 7abfd96cf..c52c5165a 100644 --- a/ship_gui.c +++ b/ship_gui.c @@ -816,7 +816,7 @@ static void ShipDepotWndProc(Window* w, WindowEvent* e) DeleteWindowById(WC_BUILD_VEHICLE, w->window_number); break; - case WE_DRAGDROP: { + case WE_DRAGDROP: switch(e->click.widget) { case 5: { Vehicle *v; @@ -854,8 +854,6 @@ static void ShipDepotWndProc(Window* w, WindowEvent* e) SetWindowDirty(w); } break; - } - break; case WE_RESIZE: w->vscroll.cap += e->sizing.diff.y / 24; -- cgit v1.2.3-70-g09d2