1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-22 22:34:33 +01:00

Turn ride_id_t into a strong type

This commit is contained in:
ZehMatt
2021-08-02 07:24:39 +03:00
committed by ζeh Matt
parent c81bd7fe22
commit 49bbc0f854

View File

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