VERY experimental Nintendo Switch 2 emulator
C++
logging/log: use `underlying_type` instead of hardcoding types
liushuyu52e9cd7743e8
diff --git a/src/common/logging/log.h b/src/common/logging/log.hindex b6a14972f4..096a441b83 100644--- a/src/common/logging/log.h+++ b/src/common/logging/log.h@@ -16,10 +16,12 @@// a generic formatter for enum classes (<= 32 bits)#if FMT_VERSION >= 80100template <typename T>-struct fmt::formatter<T, std::enable_if_t<std::is_enum_v<T>, char>> : formatter<u32> {+struct fmt::formatter<T, std::enable_if_t<std::is_enum_v<T>, char>>+ : formatter<std::underlying_type_t<T>> {template <typename FormatContext>auto format(const T& value, FormatContext& ctx) -> decltype(ctx.out()) {- return fmt::formatter<u32>::format(static_cast<u32>(value), ctx);+ return fmt::formatter<std::underlying_type_t<T>>::format(+ static_cast<std::underlying_type_t<T>>(value), ctx);}};#endif