mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-04-27 07:05:42 -04:00
MemorySettingsInterface: Fix bool and SetValue()
This commit is contained in:
parent
e10ff550d5
commit
bbeae07478
@ -145,7 +145,7 @@ void MemorySettingsInterface::SetDoubleValue(const char* section, const char* ke
|
|||||||
|
|
||||||
void MemorySettingsInterface::SetBoolValue(const char* section, const char* key, bool value)
|
void MemorySettingsInterface::SetBoolValue(const char* section, const char* key, bool value)
|
||||||
{
|
{
|
||||||
SetValue(section, key, std::to_string(value));
|
SetValue(section, key, value ? "true" : "false");
|
||||||
}
|
}
|
||||||
|
|
||||||
void MemorySettingsInterface::SetStringValue(const char* section, const char* key, const char* value)
|
void MemorySettingsInterface::SetStringValue(const char* section, const char* key, const char* value)
|
||||||
@ -181,7 +181,7 @@ void MemorySettingsInterface::SetValue(const char* section, const char* key, std
|
|||||||
sit = m_sections.emplace(std::make_pair(std::string(section), KeyMap())).first;
|
sit = m_sections.emplace(std::make_pair(std::string(section), KeyMap())).first;
|
||||||
|
|
||||||
const auto range = sit->second.equal_range(key);
|
const auto range = sit->second.equal_range(key);
|
||||||
if (range.first == sit->second.end())
|
if (range.first == range.second)
|
||||||
{
|
{
|
||||||
sit->second.emplace(std::string(key), std::move(value));
|
sit->second.emplace(std::string(key), std::move(value));
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user