From 2768910fbf4d80f93b6ea8b2a31f963fee24691d Mon Sep 17 00:00:00 2001 From: ZehMatt Date: Mon, 2 Aug 2021 09:00:38 +0300 Subject: [PATCH] Allow Formatter to accept ride_id_t --- src/openrct2/localisation/Formatter.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/openrct2/localisation/Formatter.h b/src/openrct2/localisation/Formatter.h index 7151fdbf94..fb392c9d97 100644 --- a/src/openrct2/localisation/Formatter.h +++ b/src/openrct2/localisation/Formatter.h @@ -16,6 +16,8 @@ extern thread_local uint8_t gCommonFormatArgs[80]; +enum class ride_id_t : uint16_t; + class Formatter { std::array Buffer{}; @@ -83,6 +85,7 @@ public: std::is_same_v::type, int32_t> || std::is_same_v::type, money32> || std::is_same_v::type, money64> || + std::is_same_v::type, ride_id_t> || std::is_same_v::type, rct_string_id> || std::is_same_v::type, uint16_t> || std::is_same_v::type, uint32_t> || @@ -92,7 +95,7 @@ public: // clang-format on uint64_t convertedValue; - if constexpr (std::is_integral_v) + if constexpr (std::is_integral_v || std::is_enum_v) { convertedValue = static_cast(value); }