Skip to content

Commit 372c314

Browse files
committed
fix building with fmt11 and GCC
1 parent 5bd253a commit 372c314

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/Cafe/GameProfile/GameProfile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ bool gameProfile_loadEnumOption(IniParser& iniParser, const char* optionName, T&
140140
for(const T& v : T())
141141
{
142142
// test integer option
143-
if (boost::iequals(fmt::format("{}", static_cast<typename std::underlying_type<T>::type>(v)), *option_value))
143+
if (boost::iequals(fmt::format("{}", fmt::underlying(v)), *option_value))
144144
{
145145
option = v;
146146
return true;

src/config/CemuConfig.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ ENABLE_ENUM_ITERATORS(CrashDump, CrashDump::Disabled, CrashDump::Enabled);
192192
#endif
193193

194194
template <>
195-
struct fmt::formatter<PrecompiledShaderOption> : formatter<string_view> {
195+
struct fmt::formatter<const PrecompiledShaderOption> : formatter<string_view> {
196196
template <typename FormatContext>
197197
auto format(const PrecompiledShaderOption c, FormatContext &ctx) const {
198198
string_view name;
@@ -207,7 +207,7 @@ struct fmt::formatter<PrecompiledShaderOption> : formatter<string_view> {
207207
}
208208
};
209209
template <>
210-
struct fmt::formatter<AccurateShaderMulOption> : formatter<string_view> {
210+
struct fmt::formatter<const AccurateShaderMulOption> : formatter<string_view> {
211211
template <typename FormatContext>
212212
auto format(const AccurateShaderMulOption c, FormatContext &ctx) const {
213213
string_view name;
@@ -221,7 +221,7 @@ struct fmt::formatter<AccurateShaderMulOption> : formatter<string_view> {
221221
}
222222
};
223223
template <>
224-
struct fmt::formatter<CPUMode> : formatter<string_view> {
224+
struct fmt::formatter<const CPUMode> : formatter<string_view> {
225225
template <typename FormatContext>
226226
auto format(const CPUMode c, FormatContext &ctx) const {
227227
string_view name;
@@ -238,7 +238,7 @@ struct fmt::formatter<CPUMode> : formatter<string_view> {
238238
}
239239
};
240240
template <>
241-
struct fmt::formatter<CPUModeLegacy> : formatter<string_view> {
241+
struct fmt::formatter<const CPUModeLegacy> : formatter<string_view> {
242242
template <typename FormatContext>
243243
auto format(const CPUModeLegacy c, FormatContext &ctx) const {
244244
string_view name;
@@ -255,7 +255,7 @@ struct fmt::formatter<CPUModeLegacy> : formatter<string_view> {
255255
}
256256
};
257257
template <>
258-
struct fmt::formatter<CafeConsoleRegion> : formatter<string_view> {
258+
struct fmt::formatter<const CafeConsoleRegion> : formatter<string_view> {
259259
template <typename FormatContext>
260260
auto format(const CafeConsoleRegion v, FormatContext &ctx) const {
261261
string_view name;
@@ -276,7 +276,7 @@ struct fmt::formatter<CafeConsoleRegion> : formatter<string_view> {
276276
}
277277
};
278278
template <>
279-
struct fmt::formatter<CafeConsoleLanguage> : formatter<string_view> {
279+
struct fmt::formatter<const CafeConsoleLanguage> : formatter<string_view> {
280280
template <typename FormatContext>
281281
auto format(const CafeConsoleLanguage v, FormatContext &ctx) {
282282
string_view name;
@@ -302,7 +302,7 @@ struct fmt::formatter<CafeConsoleLanguage> : formatter<string_view> {
302302

303303
#if BOOST_OS_WINDOWS
304304
template <>
305-
struct fmt::formatter<CrashDump> : formatter<string_view> {
305+
struct fmt::formatter<const CrashDump> : formatter<string_view> {
306306
template <typename FormatContext>
307307
auto format(const CrashDump v, FormatContext &ctx) {
308308
string_view name;
@@ -319,7 +319,7 @@ struct fmt::formatter<CrashDump> : formatter<string_view> {
319319
};
320320
#elif BOOST_OS_UNIX
321321
template <>
322-
struct fmt::formatter<CrashDump> : formatter<string_view> {
322+
struct fmt::formatter<const CrashDump> : formatter<string_view> {
323323
template <typename FormatContext>
324324
auto format(const CrashDump v, FormatContext &ctx) {
325325
string_view name;

0 commit comments

Comments
 (0)