diff --git a/src/openrct2-ui/windows/NewRide.cpp b/src/openrct2-ui/windows/NewRide.cpp index d39234decf..151068187d 100644 --- a/src/openrct2-ui/windows/NewRide.cpp +++ b/src/openrct2-ui/windows/NewRide.cpp @@ -281,9 +281,9 @@ namespace OpenRCT2::Ui::Windows RideSelection _windowNewRideListItems[RideListItemsMax]{}; struct NewRideVariables { - RideSelection SelectedRide; - RideSelection HighlightedRide; - uint16_t SelectedRideCountdown; + RideSelection SelectedRide{}; + RideSelection HighlightedRide{}; + uint16_t SelectedRideCountdown{}; } _newRideVars{}; public: diff --git a/src/openrct2/ride/RideEntry.h b/src/openrct2/ride/RideEntry.h index 356b62508d..cf43d5b401 100644 --- a/src/openrct2/ride/RideEntry.h +++ b/src/openrct2/ride/RideEntry.h @@ -20,7 +20,6 @@ // Set to 255 on all tracked ride entries static uint8_t constexpr kNoFlatRideCars = 0xFF; -static ride_type_t constexpr kRideTypeNull = 0xFF; struct RideNaming { diff --git a/src/openrct2/ride/RideTypes.h b/src/openrct2/ride/RideTypes.h index 4fd21fe245..c03540692f 100644 --- a/src/openrct2/ride/RideTypes.h +++ b/src/openrct2/ride/RideTypes.h @@ -19,14 +19,15 @@ struct Ride; using ride_type_t = uint16_t; +static ride_type_t constexpr kRideTypeNull = 0xFF; /** * Couples a ride type and subtype together. */ struct RideSelection { - ride_type_t Type; - ObjectEntryIndex EntryIndex; + ride_type_t Type = kRideTypeNull; + ObjectEntryIndex EntryIndex = kObjectEntryIndexNull; bool operator==(const RideSelection& other) const {