diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-10-04 02:28:48 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-10-04 02:28:48 -0400 |
commit | 43f87b4bcaa6d160cf7c4856109af06ea4873cf3 (patch) | |
tree | 8b04cd91eb747ddef40ce6e2db2e1efda7ff4ba4 /settings.cpp | |
parent | bbe36a8246041544d6ebe420dfa1b695b6c74521 (diff) | |
download | abaddon-portaudio-43f87b4bcaa6d160cf7c4856109af06ea4873cf3.tar.gz abaddon-portaudio-43f87b4bcaa6d160cf7c4856109af06ea4873cf3.zip |
allow limiting concurrent http requests
add Semaphore
update SettingsManager a little
Diffstat (limited to 'settings.cpp')
-rw-r--r-- | settings.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/settings.cpp b/settings.cpp index 494f1ba..daff887 100644 --- a/settings.cpp +++ b/settings.cpp @@ -14,12 +14,12 @@ SettingsManager::SettingsManager(std::string filename) m_ok = rc == SI_OK; } -std::string SettingsManager::GetSetting(std::string section, std::string key, std::string fallback) { +std::string SettingsManager::GetSettingString(std::string section, std::string key, std::string fallback) const { return m_ini.GetValue(section.c_str(), key.c_str(), fallback.c_str()); } -void SettingsManager::SetSetting(std::string section, std::string key, std::string value) { - m_ini.SetValue(section.c_str(), key.c_str(), value.c_str()); +int SettingsManager::GetSettingInt(std::string section, std::string key, int fallback) const { + return std::stoul(GetSettingString(section, key, std::to_string(fallback))); } bool SettingsManager::IsValid() const { |