mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Eliminate SettingsHandler's SetBytes
and Reset
methods
Also make the `Decrypt` method private. As far as I can tell, the only motivation for exposing the `SetBytes` and `Reset` methods is to allow `CBoot::SetupWiiMemory` to use the same `SettingsHandler` instance to read settings data and then write it back. It seems cleaner to just use two separate instances, and require a given `SettingsHandler` instance to be used for either writing data to a buffer or reading data from a buffer, but not both. A natural next step is to split the `SettingsHandler` class into two classes, one for writing data and one for reading data. I've deferred that change for a future PR.
This commit is contained in:
@ -30,14 +30,12 @@ public:
|
||||
void AddSetting(std::string_view key, std::string_view value);
|
||||
|
||||
const Buffer& GetBytes() const;
|
||||
void SetBytes(const Buffer& buffer);
|
||||
std::string GetValue(std::string_view key) const;
|
||||
|
||||
void Decrypt();
|
||||
void Reset();
|
||||
static std::string GenerateSerialNumber();
|
||||
|
||||
private:
|
||||
void Decrypt();
|
||||
void WriteLine(std::string_view str);
|
||||
void WriteByte(u8 b);
|
||||
|
||||
|
Reference in New Issue
Block a user