From c5e1abcfb1ada0340e7edfacc9a8152a02208f96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Wed, 2 Jan 2019 22:22:52 +0100 Subject: [PATCH] Fix implicit fallthroughs --- src/openrct2-ui/WindowManager.cpp | 1 + src/openrct2/Cheats.cpp | 5 +---- src/openrct2/Intro.cpp | 1 + src/openrct2/network/Network.cpp | 2 +- src/openrct2/ride/Vehicle.cpp | 2 +- src/openrct2/ride/coaster/AirPoweredVerticalCoaster.cpp | 2 +- 6 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/openrct2-ui/WindowManager.cpp b/src/openrct2-ui/WindowManager.cpp index bf9bdf603e..d6fc874684 100644 --- a/src/openrct2-ui/WindowManager.cpp +++ b/src/openrct2-ui/WindowManager.cpp @@ -398,6 +398,7 @@ public: } window_invalidate(w); } + break; } case INTENT_ACTION_UPDATE_CLIMATE: diff --git a/src/openrct2/Cheats.cpp b/src/openrct2/Cheats.cpp index 03a4b139f4..e88c0ab2d4 100644 --- a/src/openrct2/Cheats.cpp +++ b/src/openrct2/Cheats.cpp @@ -876,10 +876,7 @@ const char* cheats_get_cheat_string(int cheat, int edx, int edi) { return language_get_string(STR_CHEAT_MOWED_GRASS); } - else if (edx == 1) - { - return language_get_string(STR_CHEAT_CLEAR_GRASS); - } + return language_get_string(STR_CHEAT_CLEAR_GRASS); case CHEAT_WATERPLANTS: return language_get_string(STR_CHEAT_WATER_PLANTS); case CHEAT_FIXVANDALISM: diff --git a/src/openrct2/Intro.cpp b/src/openrct2/Intro.cpp index 61e26ce769..3feaf93ccb 100644 --- a/src/openrct2/Intro.cpp +++ b/src/openrct2/Intro.cpp @@ -47,6 +47,7 @@ void intro_update() case INTRO_STATE_DISCLAIMER_2: // Originally used for the disclaimer text gIntroState = INTRO_STATE_PUBLISHER_BEGIN; + [[fallthrough]]; case INTRO_STATE_PUBLISHER_BEGIN: load_palette(); diff --git a/src/openrct2/network/Network.cpp b/src/openrct2/network/Network.cpp index 51c65597e3..a58661a970 100644 --- a/src/openrct2/network/Network.cpp +++ b/src/openrct2/network/Network.cpp @@ -30,7 +30,7 @@ // This string specifies which version of network stream current build uses. // It is used for making sure only compatible builds get connected, even within // single OpenRCT2 version. -#define NETWORK_STREAM_VERSION "18" +#define NETWORK_STREAM_VERSION "19" #define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION static rct_peep* _pickup_peep = nullptr; diff --git a/src/openrct2/ride/Vehicle.cpp b/src/openrct2/ride/Vehicle.cpp index 4acec446dc..85c396b28f 100644 --- a/src/openrct2/ride/Vehicle.cpp +++ b/src/openrct2/ride/Vehicle.cpp @@ -2048,7 +2048,7 @@ static void vehicle_update_moving_to_end_of_station(rct_vehicle* vehicle) flags = vehicle_update_track_motion(vehicle, &station); if (!(flags & VEHICLE_UPDATE_MOTION_TRACK_FLAG_5)) break; - // Fall through to next case + [[fallthrough]]; case RIDE_MODE_BUMPERCAR: case RIDE_MODE_SWING: case RIDE_MODE_ROTATION: diff --git a/src/openrct2/ride/coaster/AirPoweredVerticalCoaster.cpp b/src/openrct2/ride/coaster/AirPoweredVerticalCoaster.cpp index eac2b38295..7dae8fd258 100644 --- a/src/openrct2/ride/coaster/AirPoweredVerticalCoaster.cpp +++ b/src/openrct2/ride/coaster/AirPoweredVerticalCoaster.cpp @@ -670,8 +670,8 @@ static void air_powered_vertical_rc_track_vertical_slope_up( paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0); paint_util_set_general_support_height(session, height + supportHeights[trackSequence], 0x20); - break; } + break; case 1: case 2: case 3: