mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +00:00
meh
This commit is contained in:
parent
2c393d35f0
commit
98c174edc4
520 changed files with 74815 additions and 58942 deletions
|
@ -17,14 +17,14 @@
|
|||
|
||||
namespace Common
|
||||
{
|
||||
SettingsHandler::SettingsHandler()
|
||||
SettingsHandler::SettingsHandler() : m_buffer{}, m_position{0}, m_key{INITIAL_SEED}, decoded{""}
|
||||
{
|
||||
Reset();
|
||||
}
|
||||
|
||||
SettingsHandler::SettingsHandler(Buffer&& buffer)
|
||||
SettingsHandler::SettingsHandler(const Buffer& buffer) : SettingsHandler()
|
||||
{
|
||||
SetBytes(std::move(buffer));
|
||||
m_buffer = buffer;
|
||||
Decrypt();
|
||||
}
|
||||
|
||||
const SettingsHandler::Buffer& SettingsHandler::GetBytes() const
|
||||
|
@ -32,13 +32,6 @@ const SettingsHandler::Buffer& SettingsHandler::GetBytes() const
|
|||
return m_buffer;
|
||||
}
|
||||
|
||||
void SettingsHandler::SetBytes(Buffer&& buffer)
|
||||
{
|
||||
Reset();
|
||||
m_buffer = std::move(buffer);
|
||||
Decrypt();
|
||||
}
|
||||
|
||||
std::string SettingsHandler::GetValue(std::string_view key) const
|
||||
{
|
||||
constexpr char delim[] = "\n";
|
||||
|
@ -84,14 +77,6 @@ void SettingsHandler::Decrypt()
|
|||
std::erase(decoded, '\x0d');
|
||||
}
|
||||
|
||||
void SettingsHandler::Reset()
|
||||
{
|
||||
decoded = "";
|
||||
m_position = 0;
|
||||
m_key = INITIAL_SEED;
|
||||
m_buffer = {};
|
||||
}
|
||||
|
||||
void SettingsHandler::AddSetting(std::string_view key, std::string_view value)
|
||||
{
|
||||
WriteLine(fmt::format("{}={}\r\n", key, value));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue