Correct further warnings

This commit is contained in:
duncanspumpkin 2021-04-10 07:47:17 +01:00
parent 4b457ae4fb
commit c44888a556
3 changed files with 3 additions and 3 deletions

View File

@ -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__

View File

@ -2321,7 +2321,7 @@ bool Guest::FindVehicleToEnter(Ride* ride, std::vector<uint8_t>& 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;
}

View File

@ -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