diff --git a/Utilities/cheat_info.cpp b/Utilities/cheat_info.cpp index c46f2089e9..a16be2767f 100644 --- a/Utilities/cheat_info.cpp +++ b/Utilities/cheat_info.cpp @@ -4,6 +4,29 @@ LOG_CHANNEL(log_cheat, "Cheat"); +template <> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](cheat_type value) + { + switch (value) + { + case cheat_type::unsigned_8_cheat: return "Unsigned 8 bits"; + case cheat_type::unsigned_16_cheat: return "Unsigned 16 bits"; + case cheat_type::unsigned_32_cheat: return "Unsigned 32 bits"; + case cheat_type::unsigned_64_cheat: return "Unsigned 64 bits"; + case cheat_type::signed_8_cheat: return "Signed 8 bits"; + case cheat_type::signed_16_cheat: return "Signed 16 bits"; + case cheat_type::signed_32_cheat: return "Signed 32 bits"; + case cheat_type::signed_64_cheat: return "Signed 64 bits"; + case cheat_type::float_32_cheat: return "Float 32 bits"; + case cheat_type::max: break; + } + + return unknown; + }); +} + bool cheat_info::from_str(const std::string& cheat_line) { auto cheat_vec = fmt::split(cheat_line, {"@@@"}, false); diff --git a/rpcs3/rpcs3qt/cheat_manager.cpp b/rpcs3/rpcs3qt/cheat_manager.cpp index cd7fe67804..8f1f1cb049 100644 --- a/rpcs3/rpcs3qt/cheat_manager.cpp +++ b/rpcs3/rpcs3qt/cheat_manager.cpp @@ -29,29 +29,6 @@ LOG_CHANNEL(log_cheat, "Cheat"); cheat_manager_dialog* cheat_manager_dialog::inst = nullptr; -template <> -void fmt_class_string::format(std::string& out, u64 arg) -{ - format_enum(out, arg, [](cheat_type value) - { - switch (value) - { - case cheat_type::unsigned_8_cheat: return "Unsigned 8 bits"; - case cheat_type::unsigned_16_cheat: return "Unsigned 16 bits"; - case cheat_type::unsigned_32_cheat: return "Unsigned 32 bits"; - case cheat_type::unsigned_64_cheat: return "Unsigned 64 bits"; - case cheat_type::signed_8_cheat: return "Signed 8 bits"; - case cheat_type::signed_16_cheat: return "Signed 16 bits"; - case cheat_type::signed_32_cheat: return "Signed 32 bits"; - case cheat_type::signed_64_cheat: return "Signed 64 bits"; - case cheat_type::float_32_cheat: return "Float 32 bits"; - case cheat_type::max: break; - } - - return unknown; - }); -} - YAML::Emitter& operator<<(YAML::Emitter& out, const cheat_info& rhs) { std::string type_formatted;