fix building with fmt11 and GCC

This commit is contained in:
goeiecool9999 2025-01-23 21:02:09 +01:00
parent 5bd253a1f8
commit 372c314f06
2 changed files with 9 additions and 9 deletions

View File

@ -140,7 +140,7 @@ bool gameProfile_loadEnumOption(IniParser& iniParser, const char* optionName, T&
for(const T& v : T())
{
// test integer option
if (boost::iequals(fmt::format("{}", static_cast<typename std::underlying_type<T>::type>(v)), *option_value))
if (boost::iequals(fmt::format("{}", fmt::underlying(v)), *option_value))
{
option = v;
return true;

View File

@ -192,7 +192,7 @@ ENABLE_ENUM_ITERATORS(CrashDump, CrashDump::Disabled, CrashDump::Enabled);
#endif
template <>
struct fmt::formatter<PrecompiledShaderOption> : formatter<string_view> {
struct fmt::formatter<const PrecompiledShaderOption> : formatter<string_view> {
template <typename FormatContext>
auto format(const PrecompiledShaderOption c, FormatContext &ctx) const {
string_view name;
@ -207,7 +207,7 @@ struct fmt::formatter<PrecompiledShaderOption> : formatter<string_view> {
}
};
template <>
struct fmt::formatter<AccurateShaderMulOption> : formatter<string_view> {
struct fmt::formatter<const AccurateShaderMulOption> : formatter<string_view> {
template <typename FormatContext>
auto format(const AccurateShaderMulOption c, FormatContext &ctx) const {
string_view name;
@ -221,7 +221,7 @@ struct fmt::formatter<AccurateShaderMulOption> : formatter<string_view> {
}
};
template <>
struct fmt::formatter<CPUMode> : formatter<string_view> {
struct fmt::formatter<const CPUMode> : formatter<string_view> {
template <typename FormatContext>
auto format(const CPUMode c, FormatContext &ctx) const {
string_view name;
@ -238,7 +238,7 @@ struct fmt::formatter<CPUMode> : formatter<string_view> {
}
};
template <>
struct fmt::formatter<CPUModeLegacy> : formatter<string_view> {
struct fmt::formatter<const CPUModeLegacy> : formatter<string_view> {
template <typename FormatContext>
auto format(const CPUModeLegacy c, FormatContext &ctx) const {
string_view name;
@ -255,7 +255,7 @@ struct fmt::formatter<CPUModeLegacy> : formatter<string_view> {
}
};
template <>
struct fmt::formatter<CafeConsoleRegion> : formatter<string_view> {
struct fmt::formatter<const CafeConsoleRegion> : formatter<string_view> {
template <typename FormatContext>
auto format(const CafeConsoleRegion v, FormatContext &ctx) const {
string_view name;
@ -276,7 +276,7 @@ struct fmt::formatter<CafeConsoleRegion> : formatter<string_view> {
}
};
template <>
struct fmt::formatter<CafeConsoleLanguage> : formatter<string_view> {
struct fmt::formatter<const CafeConsoleLanguage> : formatter<string_view> {
template <typename FormatContext>
auto format(const CafeConsoleLanguage v, FormatContext &ctx) {
string_view name;
@ -302,7 +302,7 @@ struct fmt::formatter<CafeConsoleLanguage> : formatter<string_view> {
#if BOOST_OS_WINDOWS
template <>
struct fmt::formatter<CrashDump> : formatter<string_view> {
struct fmt::formatter<const CrashDump> : formatter<string_view> {
template <typename FormatContext>
auto format(const CrashDump v, FormatContext &ctx) {
string_view name;
@ -319,7 +319,7 @@ struct fmt::formatter<CrashDump> : formatter<string_view> {
};
#elif BOOST_OS_UNIX
template <>
struct fmt::formatter<CrashDump> : formatter<string_view> {
struct fmt::formatter<const CrashDump> : formatter<string_view> {
template <typename FormatContext>
auto format(const CrashDump v, FormatContext &ctx) {
string_view name;