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);
|
widget_invalidate_by_number(cursor_w_class, cursor_w_number, widgetIndex);
|
||||||
window_event_mouse_up_call(w, widgetIndex);
|
window_event_mouse_up_call(w, widgetIndex);
|
||||||
|
return;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -767,7 +767,7 @@ static void window_top_toolbar_invalidate(rct_window* w)
|
||||||
break;
|
break;
|
||||||
case NETWORK_MODE_CLIENT:
|
case NETWORK_MODE_CLIENT:
|
||||||
window_top_toolbar_widgets[WIDX_PAUSE].type = WWT_EMPTY;
|
window_top_toolbar_widgets[WIDX_PAUSE].type = WWT_EMPTY;
|
||||||
// Fall-through
|
[[fallthrough]];
|
||||||
case NETWORK_MODE_SERVER:
|
case NETWORK_MODE_SERVER:
|
||||||
window_top_toolbar_widgets[WIDX_FASTFORWARD].type = WWT_EMPTY;
|
window_top_toolbar_widgets[WIDX_FASTFORWARD].type = WWT_EMPTY;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -657,16 +657,12 @@ static void peep_pathfind_heuristic_search(
|
||||||
* tile. */
|
* tile. */
|
||||||
rideIndex = tileElement->AsTrack()->GetRideIndex();
|
rideIndex = tileElement->AsTrack()->GetRideIndex();
|
||||||
Ride* ride = get_ride(rideIndex);
|
Ride* ride = get_ride(rideIndex);
|
||||||
if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_IS_SHOP))
|
if (!ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_IS_SHOP))
|
||||||
{
|
|
||||||
found = true;
|
|
||||||
searchResult = PATH_SEARCH_SHOP_ENTRANCE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
found = true;
|
||||||
|
searchResult = PATH_SEARCH_SHOP_ENTRANCE;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case TILE_ELEMENT_TYPE_ENTRANCE:
|
case TILE_ELEMENT_TYPE_ENTRANCE:
|
||||||
if (loc.z != tileElement->base_height)
|
if (loc.z != tileElement->base_height)
|
||||||
|
|
|
@ -1417,7 +1417,7 @@ static money32 track_place(
|
||||||
case TRACK_ELEM_DIAG_60_DEG_UP_TO_FLAT:
|
case TRACK_ELEM_DIAG_60_DEG_UP_TO_FLAT:
|
||||||
if (!(liftHillAndAlternativeState & CONSTRUCTION_LIFT_HILL_SELECTED))
|
if (!(liftHillAndAlternativeState & CONSTRUCTION_LIFT_HILL_SELECTED))
|
||||||
break;
|
break;
|
||||||
// Fall Through
|
[[fallthrough]];
|
||||||
case TRACK_ELEM_CABLE_LIFT_HILL:
|
case TRACK_ELEM_CABLE_LIFT_HILL:
|
||||||
ride->num_block_brakes++;
|
ride->num_block_brakes++;
|
||||||
break;
|
break;
|
||||||
|
@ -1833,7 +1833,7 @@ static money32 track_remove(
|
||||||
case TRACK_ELEM_DIAG_60_DEG_UP_TO_FLAT:
|
case TRACK_ELEM_DIAG_60_DEG_UP_TO_FLAT:
|
||||||
if (!isLiftHill)
|
if (!isLiftHill)
|
||||||
break;
|
break;
|
||||||
// Fall through
|
[[fallthrough]];
|
||||||
case TRACK_ELEM_CABLE_LIFT_HILL:
|
case TRACK_ELEM_CABLE_LIFT_HILL:
|
||||||
ride->num_block_brakes--;
|
ride->num_block_brakes--;
|
||||||
break;
|
break;
|
||||||
|
@ -2372,4 +2372,4 @@ void TrackElement::SetHighlight(bool on)
|
||||||
type &= ~TILE_ELEMENT_TYPE_FLAG_HIGHLIGHT;
|
type &= ~TILE_ELEMENT_TYPE_FLAG_HIGHLIGHT;
|
||||||
if (on)
|
if (on)
|
||||||
type |= TILE_ELEMENT_TYPE_FLAG_HIGHLIGHT;
|
type |= TILE_ELEMENT_TYPE_FLAG_HIGHLIGHT;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3277,7 +3277,7 @@ static void vehicle_update_departing(rct_vehicle* vehicle)
|
||||||
vehicle->acceleration = 14 << 12;
|
vehicle->acceleration = 14 << 12;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Fall through
|
[[fallthrough]];
|
||||||
case RIDE_MODE_CONTINUOUS_CIRCUIT:
|
case RIDE_MODE_CONTINUOUS_CIRCUIT:
|
||||||
case RIDE_MODE_CONTINUOUS_CIRCUIT_BLOCK_SECTIONED:
|
case RIDE_MODE_CONTINUOUS_CIRCUIT_BLOCK_SECTIONED:
|
||||||
case RIDE_MODE_ROTATING_LIFT:
|
case RIDE_MODE_ROTATING_LIFT:
|
||||||
|
@ -7162,7 +7162,7 @@ static void vehicle_update_spinning_car(rct_vehicle* vehicle)
|
||||||
vehicle->spin_speed -= dword_F64E08 >> spinningInertia;
|
vehicle->spin_speed -= dword_F64E08 >> spinningInertia;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Fall through
|
[[fallthrough]];
|
||||||
case L9_SPIN:
|
case L9_SPIN:
|
||||||
spinningInertia += 9;
|
spinningInertia += 9;
|
||||||
vehicle->spin_speed += dword_F64E08 >> spinningInertia;
|
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;
|
vehicle->spin_speed += dword_F64E08 >> spinningInertia;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Fall through
|
[[fallthrough]];
|
||||||
case R9_SPIN:
|
case R9_SPIN:
|
||||||
spinningInertia += 9;
|
spinningInertia += 9;
|
||||||
vehicle->spin_speed -= dword_F64E08 >> spinningInertia;
|
vehicle->spin_speed -= dword_F64E08 >> spinningInertia;
|
||||||
|
|
|
@ -59,7 +59,7 @@ static void paint_dodgems(
|
||||||
{
|
{
|
||||||
case 2:
|
case 2:
|
||||||
trackSequence = 15 - trackSequence;
|
trackSequence = 15 - trackSequence;
|
||||||
// Fallthrough
|
[[fallthrough]];
|
||||||
case 0:
|
case 0:
|
||||||
if ((trackSequence / 4) & 1)
|
if ((trackSequence / 4) & 1)
|
||||||
{
|
{
|
||||||
|
@ -73,7 +73,7 @@ static void paint_dodgems(
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
trackSequence = 15 - trackSequence;
|
trackSequence = 15 - trackSequence;
|
||||||
// Fallthrough
|
[[fallthrough]];
|
||||||
case 1:
|
case 1:
|
||||||
if ((trackSequence / 4) & 1)
|
if ((trackSequence / 4) & 1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -3134,8 +3134,7 @@ void map_remove_all_rides()
|
||||||
case TILE_ELEMENT_TYPE_ENTRANCE:
|
case TILE_ELEMENT_TYPE_ENTRANCE:
|
||||||
if (it.element->AsEntrance()->GetEntranceType() == ENTRANCE_TYPE_PARK_ENTRANCE)
|
if (it.element->AsEntrance()->GetEntranceType() == ENTRANCE_TYPE_PARK_ENTRANCE)
|
||||||
break;
|
break;
|
||||||
|
[[fallthrough]];
|
||||||
// fall-through
|
|
||||||
case TILE_ELEMENT_TYPE_TRACK:
|
case TILE_ELEMENT_TYPE_TRACK:
|
||||||
footpath_queue_chain_reset();
|
footpath_queue_chain_reset();
|
||||||
footpath_remove_edges_at(it.x * 32, it.y * 32, it.element);
|
footpath_remove_edges_at(it.x * 32, it.y * 32, it.element);
|
||||||
|
|
Loading…
Reference in New Issue