logic: Configmanager support for lists
Configmanager now works with list. Use getValues for list. Configmanager is able to save into a file now.
This commit is contained in:
+1
-14
@@ -33,7 +33,7 @@ void Settings::save(const std::string& filePath)
|
||||
{
|
||||
if (m_config)
|
||||
{
|
||||
m_config->save();
|
||||
m_config->save(filePath);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -45,16 +45,3 @@ void Settings::clear()
|
||||
{
|
||||
m_config = ConfigManager::createEmpty();
|
||||
}
|
||||
|
||||
std::vector<std::string> Settings::getValues(const std::string& key, std::string defaultValue) const
|
||||
{
|
||||
std::string value = getValue<std::string>(key, defaultValue);
|
||||
|
||||
if (value.size())
|
||||
{
|
||||
std::deque<std::string> values = utility::split(value, '|');
|
||||
return std::vector<std::string>(values.begin(), values.end());
|
||||
}
|
||||
|
||||
return std::vector<std::string>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user