mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix some more implicit and conditional fallthroughs
This commit is contained in:
parent
c5e1abcfb1
commit
5ef5e4153d
|
@ -1365,6 +1365,8 @@ void input_state_widget_pressed(
|
|||
|
||||
widget_invalidate_by_number(cursor_w_class, cursor_w_number, widgetIndex);
|
||||
window_event_mouse_up_call(w, widgetIndex);
|
||||
return;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -767,7 +767,7 @@ static void window_top_toolbar_invalidate(rct_window* w)
|
|||
break;
|
||||
case NETWORK_MODE_CLIENT:
|
||||
window_top_toolbar_widgets[WIDX_PAUSE].type = WWT_EMPTY;
|
||||
// Fall-through
|
||||
[[fallthrough]];
|
||||
case NETWORK_MODE_SERVER:
|
||||
window_top_toolbar_widgets[WIDX_FASTFORWARD].type = WWT_EMPTY;
|
||||
break;
|
||||
|
|
|
@ -657,16 +657,12 @@ static void peep_pathfind_heuristic_search(
|
|||
* tile. */
|
||||
rideIndex = tileElement->AsTrack()->GetRideIndex();
|
||||
Ride* ride = get_ride(rideIndex);
|
||||
if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_IS_SHOP))
|
||||
{
|
||||
found = true;
|
||||
searchResult = PATH_SEARCH_SHOP_ENTRANCE;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_IS_SHOP))
|
||||
continue;
|
||||
}
|
||||
|
||||
found = true;
|
||||
searchResult = PATH_SEARCH_SHOP_ENTRANCE;
|
||||
break;
|
||||
}
|
||||
case TILE_ELEMENT_TYPE_ENTRANCE:
|
||||
if (loc.z != tileElement->base_height)
|
||||
|
|
|
@ -1417,7 +1417,7 @@ static money32 track_place(
|
|||
case TRACK_ELEM_DIAG_60_DEG_UP_TO_FLAT:
|
||||
if (!(liftHillAndAlternativeState & CONSTRUCTION_LIFT_HILL_SELECTED))
|
||||
break;
|
||||
// Fall Through
|
||||
[[fallthrough]];
|
||||
case TRACK_ELEM_CABLE_LIFT_HILL:
|
||||
ride->num_block_brakes++;
|
||||
break;
|
||||
|
@ -1833,7 +1833,7 @@ static money32 track_remove(
|
|||
case TRACK_ELEM_DIAG_60_DEG_UP_TO_FLAT:
|
||||
if (!isLiftHill)
|
||||
break;
|
||||
// Fall through
|
||||
[[fallthrough]];
|
||||
case TRACK_ELEM_CABLE_LIFT_HILL:
|
||||
ride->num_block_brakes--;
|
||||
break;
|
||||
|
|
|
@ -3277,7 +3277,7 @@ static void vehicle_update_departing(rct_vehicle* vehicle)
|
|||
vehicle->acceleration = 14 << 12;
|
||||
break;
|
||||
}
|
||||
// Fall through
|
||||
[[fallthrough]];
|
||||
case RIDE_MODE_CONTINUOUS_CIRCUIT:
|
||||
case RIDE_MODE_CONTINUOUS_CIRCUIT_BLOCK_SECTIONED:
|
||||
case RIDE_MODE_ROTATING_LIFT:
|
||||
|
@ -7162,7 +7162,7 @@ static void vehicle_update_spinning_car(rct_vehicle* vehicle)
|
|||
vehicle->spin_speed -= dword_F64E08 >> spinningInertia;
|
||||
break;
|
||||
}
|
||||
// Fall through
|
||||
[[fallthrough]];
|
||||
case L9_SPIN:
|
||||
spinningInertia += 9;
|
||||
vehicle->spin_speed += dword_F64E08 >> spinningInertia;
|
||||
|
@ -7189,7 +7189,7 @@ static void vehicle_update_spinning_car(rct_vehicle* vehicle)
|
|||
vehicle->spin_speed += dword_F64E08 >> spinningInertia;
|
||||
break;
|
||||
}
|
||||
// Fall through
|
||||
[[fallthrough]];
|
||||
case R9_SPIN:
|
||||
spinningInertia += 9;
|
||||
vehicle->spin_speed -= dword_F64E08 >> spinningInertia;
|
||||
|
|
|
@ -59,7 +59,7 @@ static void paint_dodgems(
|
|||
{
|
||||
case 2:
|
||||
trackSequence = 15 - trackSequence;
|
||||
// Fallthrough
|
||||
[[fallthrough]];
|
||||
case 0:
|
||||
if ((trackSequence / 4) & 1)
|
||||
{
|
||||
|
@ -73,7 +73,7 @@ static void paint_dodgems(
|
|||
|
||||
case 3:
|
||||
trackSequence = 15 - trackSequence;
|
||||
// Fallthrough
|
||||
[[fallthrough]];
|
||||
case 1:
|
||||
if ((trackSequence / 4) & 1)
|
||||
{
|
||||
|
|
|
@ -3134,8 +3134,7 @@ void map_remove_all_rides()
|
|||
case TILE_ELEMENT_TYPE_ENTRANCE:
|
||||
if (it.element->AsEntrance()->GetEntranceType() == ENTRANCE_TYPE_PARK_ENTRANCE)
|
||||
break;
|
||||
|
||||
// fall-through
|
||||
[[fallthrough]];
|
||||
case TILE_ELEMENT_TYPE_TRACK:
|
||||
footpath_queue_chain_reset();
|
||||
footpath_remove_edges_at(it.x * 32, it.y * 32, it.element);
|
||||
|
|
Loading…
Reference in New Issue