mirror of https://github.com/OpenRCT2/OpenRCT2.git
Turn ride_id_t into a strong type
This commit is contained in:
parent
c81bd7fe22
commit
49bbc0f854
|
@ -13,11 +13,12 @@
|
|||
|
||||
#include <cstdint>
|
||||
#include <limits>
|
||||
#include <type_traits>
|
||||
|
||||
using ride_id_t = uint16_t;
|
||||
enum class ride_id_t : uint16_t;
|
||||
struct Ride;
|
||||
|
||||
constexpr const ride_id_t RIDE_ID_NULL = std::numeric_limits<ride_id_t>::max();
|
||||
constexpr const ride_id_t RIDE_ID_NULL = static_cast<ride_id_t>(std::numeric_limits<std::underlying_type_t<ride_id_t>>::max());
|
||||
|
||||
/**
|
||||
* Couples a ride type and subtype together.
|
||||
|
|
Loading…
Reference in New Issue