diff options
Diffstat (limited to 'Source/Core/Common/SettingsHandler.cpp')
| -rw-r--r-- | Source/Core/Common/SettingsHandler.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/Common/SettingsHandler.cpp b/Source/Core/Common/SettingsHandler.cpp index c36805d4ce..dd84b6967b 100644 --- a/Source/Core/Common/SettingsHandler.cpp +++ b/Source/Core/Common/SettingsHandler.cpp @@ -81,7 +81,7 @@ void SettingsHandler::Decrypt() // (see the comment in WriteLine), lines can be separated by CRLFLF. // To handle this, we remove every CR and treat LF as the line ending. // (We ignore empty lines.) - decoded.erase(std::remove(decoded.begin(), decoded.end(), '\x0d'), decoded.end()); + std::erase(decoded, '\x0d'); } void SettingsHandler::Reset() @@ -92,12 +92,12 @@ void SettingsHandler::Reset() m_buffer = {}; } -void SettingsHandler::AddSetting(const std::string& key, const std::string& value) +void SettingsHandler::AddSetting(std::string_view key, std::string_view value) { - WriteLine(key + '=' + value + "\r\n"); + WriteLine(fmt::format("{}={}\r\n", key, value)); } -void SettingsHandler::WriteLine(const std::string& str) +void SettingsHandler::WriteLine(std::string_view str) { const u32 old_position = m_position; const u32 old_key = m_key; |
