From c44888a55643ae3d12ec4e75f76f9607eb52a8d2 Mon Sep 17 00:00:00 2001 From: duncanspumpkin Date: Sat, 10 Apr 2021 07:47:17 +0100 Subject: [PATCH] Correct further warnings --- src/openrct2/ParkFile.cpp | 2 +- src/openrct2/peep/Guest.cpp | 2 +- src/openrct2/ride/Ride.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/openrct2/ParkFile.cpp b/src/openrct2/ParkFile.cpp index b6b3d7b7f8..0b601340ed 100644 --- a/src/openrct2/ParkFile.cpp +++ b/src/openrct2/ParkFile.cpp @@ -1640,7 +1640,7 @@ int32_t scenario_save(const utf8* path, int32_t flags) return result; } -class ParkFileImporter : public IParkImporter +class ParkFileImporter final : public IParkImporter { private: #ifdef __clang__ diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index 8f190e436f..ac18ced5e9 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -2321,7 +2321,7 @@ bool Guest::FindVehicleToEnter(Ride* ride, std::vector& car_array) { chosen_train = ride->stations[CurrentRideStation].TrainAtStation; } - if (chosen_train == RideStation::NO_TRAIN || chosen_train >= MAX_VEHICLES_PER_RIDE) + if (chosen_train >= MAX_VEHICLES_PER_RIDE) { return false; } diff --git a/src/openrct2/ride/Ride.h b/src/openrct2/ride/Ride.h index eeb2d0d0dd..a35f2b7921 100644 --- a/src/openrct2/ride/Ride.h +++ b/src/openrct2/ride/Ride.h @@ -36,7 +36,7 @@ struct Vehicle; // The max number of different types of vehicle. // Examples of vehicles here are the locomotive, tender and carriage of the Miniature Railway. #define MAX_VEHICLES_PER_RIDE_ENTRY 4 -constexpr const uint8_t MAX_VEHICLES_PER_RIDE = 255; +constexpr const uint8_t MAX_VEHICLES_PER_RIDE = 255; // Note: that 255 represents No Train (null) hence why this is not 256 #define NUM_COLOUR_SCHEMES 4 #define MAX_CATEGORIES_PER_RIDE 2 #define DOWNTIME_HISTORY_SIZE 8