(svn r5198) Fix some strange control flow: the case for MP_RAILWAY fell through the case for MP_TUNNELBRIDGE
authortron
Fri, 09 Jun 2006 15:24:04 +0000
changeset 3995 2b86d5a99f0f
parent 3994 7ed8945d7171
child 3996 5d30d315a2ed
(svn r5198) Fix some strange control flow: the case for MP_RAILWAY fell through the case for MP_TUNNELBRIDGE
elrail.c
--- a/elrail.c	Fri Jun 09 14:40:30 2006 +0000
+++ b/elrail.c	Fri Jun 09 15:24:04 2006 +0000
@@ -352,14 +352,16 @@
 					sss->x_size, sss->y_size, sss->z_size, GetSlopeZ(ti->x, ti->y) + sss->z_offset);
 				return;
 			}
-			/* Fall through */
+			break;
+
 		case MP_TUNNELBRIDGE:
-			if (IsBridgeTile(ti->tile) && IsBridgeMiddle(ti->tile) && GetRailTypeOnBridge(ti->tile) == RAILTYPE_ELECTRIC) DrawCatenaryOnBridge(ti);
-			/* Fall further */
-		case MP_STREET: case MP_STATION:
-			DrawCatenaryRailway(ti);
+			if (IsBridge(ti->tile) && IsBridgeMiddle(ti->tile) && GetRailTypeOnBridge(ti->tile) == RAILTYPE_ELECTRIC) DrawCatenaryOnBridge(ti);
 			break;
-		default:
-			break;
+
+		case MP_STREET:  break;
+		case MP_STATION: break;
+
+		default: return;
 	}
+	DrawCatenaryRailway(ti);
 }