Skip to content

Commit

Permalink
fix building with fmt11 and GCC
Browse files Browse the repository at this point in the history
  • Loading branch information
goeiecool9999 committed Jan 23, 2025
1 parent 5bd253a commit 372c314
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Cafe/GameProfile/GameProfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
16 changes: 8 additions & 8 deletions src/config/CemuConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 372c314

Please sign in to comment.