diff options
Diffstat (limited to 'src/core/memory')
| -rw-r--r-- | src/core/memory/cheat_engine.cpp | 5 | ||||
| -rw-r--r-- | src/core/memory/cheat_engine.h | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/core/memory/cheat_engine.cpp b/src/core/memory/cheat_engine.cpp index e503118dd..68d09d350 100644 --- a/src/core/memory/cheat_engine.cpp +++ b/src/core/memory/cheat_engine.cpp | |||
| @@ -98,10 +98,9 @@ std::string_view ExtractName(std::string_view data, std::size_t start_index) { | |||
| 98 | } | 98 | } |
| 99 | } // Anonymous namespace | 99 | } // Anonymous namespace |
| 100 | 100 | ||
| 101 | std::vector<CheatEntry> TextCheatParser::Parse(const Core::System& system, | 101 | std::vector<CheatEntry> TextCheatParser::Parse(std::string_view data) const { |
| 102 | std::string_view data) const { | ||
| 103 | std::vector<CheatEntry> out(1); | 102 | std::vector<CheatEntry> out(1); |
| 104 | std::optional<u64> current_entry = std::nullopt; | 103 | std::optional<u64> current_entry; |
| 105 | 104 | ||
| 106 | for (std::size_t i = 0; i < data.size(); ++i) { | 105 | for (std::size_t i = 0; i < data.size(); ++i) { |
| 107 | if (::isspace(data[i])) { | 106 | if (::isspace(data[i])) { |
diff --git a/src/core/memory/cheat_engine.h b/src/core/memory/cheat_engine.h index fa039a831..a31002346 100644 --- a/src/core/memory/cheat_engine.h +++ b/src/core/memory/cheat_engine.h | |||
| @@ -47,8 +47,7 @@ class CheatParser { | |||
| 47 | public: | 47 | public: |
| 48 | virtual ~CheatParser(); | 48 | virtual ~CheatParser(); |
| 49 | 49 | ||
| 50 | virtual std::vector<CheatEntry> Parse(const Core::System& system, | 50 | [[nodiscard]] virtual std::vector<CheatEntry> Parse(std::string_view data) const = 0; |
| 51 | std::string_view data) const = 0; | ||
| 52 | }; | 51 | }; |
| 53 | 52 | ||
| 54 | // CheatParser implementation that parses text files | 53 | // CheatParser implementation that parses text files |
| @@ -56,7 +55,7 @@ class TextCheatParser final : public CheatParser { | |||
| 56 | public: | 55 | public: |
| 57 | ~TextCheatParser() override; | 56 | ~TextCheatParser() override; |
| 58 | 57 | ||
| 59 | std::vector<CheatEntry> Parse(const Core::System& system, std::string_view data) const override; | 58 | [[nodiscard]] std::vector<CheatEntry> Parse(std::string_view data) const override; |
| 60 | }; | 59 | }; |
| 61 | 60 | ||
| 62 | // Class that encapsulates a CheatList and manages its interaction with memory and CoreTiming | 61 | // Class that encapsulates a CheatList and manages its interaction with memory and CoreTiming |