mirror of
https://git.suyu.dev/suyu/suyu
synced 2025-09-01 08:56:32 -05:00
mark format functions as const
This commit is contained in:
@@ -14,7 +14,7 @@ template <typename T>
|
||||
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()) {
|
||||
auto format(const T& value, FormatContext& ctx) const -> decltype(ctx.out()) {
|
||||
return fmt::formatter<std::underlying_type_t<T>>::format(
|
||||
static_cast<std::underlying_type_t<T>>(value), ctx);
|
||||
}
|
||||
|
@@ -262,7 +262,7 @@ struct fmt::formatter<Common::PhysicalAddress> {
|
||||
return ctx.begin();
|
||||
}
|
||||
template <typename FormatContext>
|
||||
auto format(const Common::PhysicalAddress& addr, FormatContext& ctx) {
|
||||
auto format(const Common::PhysicalAddress& addr, FormatContext& ctx) const {
|
||||
return fmt::format_to(ctx.out(), "{:#x}", static_cast<u64>(addr.GetValue()));
|
||||
}
|
||||
};
|
||||
@@ -273,7 +273,7 @@ struct fmt::formatter<Common::ProcessAddress> {
|
||||
return ctx.begin();
|
||||
}
|
||||
template <typename FormatContext>
|
||||
auto format(const Common::ProcessAddress& addr, FormatContext& ctx) {
|
||||
auto format(const Common::ProcessAddress& addr, FormatContext& ctx) const {
|
||||
return fmt::format_to(ctx.out(), "{:#x}", static_cast<u64>(addr.GetValue()));
|
||||
}
|
||||
};
|
||||
@@ -284,7 +284,7 @@ struct fmt::formatter<Common::VirtualAddress> {
|
||||
return ctx.begin();
|
||||
}
|
||||
template <typename FormatContext>
|
||||
auto format(const Common::VirtualAddress& addr, FormatContext& ctx) {
|
||||
auto format(const Common::VirtualAddress& addr, FormatContext& ctx) const {
|
||||
return fmt::format_to(ctx.out(), "{:#x}", static_cast<u64>(addr.GetValue()));
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user