mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-22 02:09:06 +00:00
Pass SettingsHandler buffers by const ref instead of rvalue ref
This commit is contained in:
parent
107379bf74
commit
d2b96736e0
6 changed files with 18 additions and 25 deletions
|
@ -22,9 +22,9 @@ SettingsHandler::SettingsHandler()
|
|||
Reset();
|
||||
}
|
||||
|
||||
SettingsHandler::SettingsHandler(Buffer&& buffer)
|
||||
SettingsHandler::SettingsHandler(const Buffer& buffer)
|
||||
{
|
||||
SetBytes(std::move(buffer));
|
||||
SetBytes(buffer);
|
||||
}
|
||||
|
||||
const SettingsHandler::Buffer& SettingsHandler::GetBytes() const
|
||||
|
@ -32,10 +32,10 @@ const SettingsHandler::Buffer& SettingsHandler::GetBytes() const
|
|||
return m_buffer;
|
||||
}
|
||||
|
||||
void SettingsHandler::SetBytes(Buffer&& buffer)
|
||||
void SettingsHandler::SetBytes(const Buffer& buffer)
|
||||
{
|
||||
Reset();
|
||||
m_buffer = std::move(buffer);
|
||||
m_buffer = buffer;
|
||||
Decrypt();
|
||||
}
|
||||
|
||||
|
|
|
@ -25,12 +25,12 @@ public:
|
|||
|
||||
using Buffer = std::array<u8, SETTINGS_SIZE>;
|
||||
SettingsHandler();
|
||||
explicit SettingsHandler(Buffer&& buffer);
|
||||
explicit SettingsHandler(const Buffer& buffer);
|
||||
|
||||
void AddSetting(std::string_view key, std::string_view value);
|
||||
|
||||
const Buffer& GetBytes() const;
|
||||
void SetBytes(Buffer&& buffer);
|
||||
void SetBytes(const Buffer& buffer);
|
||||
std::string GetValue(std::string_view key) const;
|
||||
|
||||
void Decrypt();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue