mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Make all custom fmt::formatter's format functions const
fmt 8.0.0 requires this.
This commit is contained in:
@ -193,7 +193,7 @@ struct fmt::formatter<BitField<position, bits, T, S>>
|
||||
fmt::formatter<T> m_formatter;
|
||||
constexpr auto parse(format_parse_context& ctx) { return m_formatter.parse(ctx); }
|
||||
template <typename FormatContext>
|
||||
auto format(const BitField<position, bits, T, S>& bitfield, FormatContext& ctx)
|
||||
auto format(const BitField<position, bits, T, S>& bitfield, FormatContext& ctx) const
|
||||
{
|
||||
return m_formatter.format(bitfield.Value(), ctx);
|
||||
}
|
||||
@ -479,7 +479,7 @@ struct fmt::formatter<BitFieldArrayRef<position, bits, size, T, S>>
|
||||
fmt::formatter<T> m_formatter;
|
||||
constexpr auto parse(format_parse_context& ctx) { return m_formatter.parse(ctx); }
|
||||
template <typename FormatContext>
|
||||
auto format(const BitFieldArrayRef<position, bits, size, T, S>& ref, FormatContext& ctx)
|
||||
auto format(const BitFieldArrayRef<position, bits, size, T, S>& ref, FormatContext& ctx) const
|
||||
{
|
||||
return m_formatter.format(ref.Value(), ctx);
|
||||
}
|
||||
@ -491,7 +491,8 @@ struct fmt::formatter<BitFieldArrayConstRef<position, bits, size, T, S>>
|
||||
fmt::formatter<T> m_formatter;
|
||||
constexpr auto parse(format_parse_context& ctx) { return m_formatter.parse(ctx); }
|
||||
template <typename FormatContext>
|
||||
auto format(const BitFieldArrayConstRef<position, bits, size, T, S>& ref, FormatContext& ctx)
|
||||
auto format(const BitFieldArrayConstRef<position, bits, size, T, S>& ref,
|
||||
FormatContext& ctx) const
|
||||
{
|
||||
return m_formatter.format(ref.Value(), ctx);
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ public:
|
||||
}
|
||||
|
||||
template <typename FormatContext>
|
||||
auto format(const T& e, FormatContext& ctx)
|
||||
auto format(const T& e, FormatContext& ctx) const
|
||||
{
|
||||
const auto value_s = static_cast<std::underlying_type_t<T>>(e); // Possibly signed
|
||||
const auto value_u = static_cast<std::make_unsigned_t<T>>(value_s); // Always unsigned
|
||||
|
@ -25,7 +25,7 @@ struct fmt::formatter<Common::HRWrap>
|
||||
{
|
||||
constexpr auto parse(fmt::format_parse_context& ctx) { return ctx.begin(); }
|
||||
template <typename FormatContext>
|
||||
auto format(const Common::HRWrap& hr, FormatContext& ctx)
|
||||
auto format(const Common::HRWrap& hr, FormatContext& ctx) const
|
||||
{
|
||||
return fmt::format_to(ctx.out(), "{} ({:#010x})", Common::GetHResultMessage(hr.m_hr),
|
||||
static_cast<u32>(hr.m_hr));
|
||||
|
Reference in New Issue
Block a user