parent
08355643ab
commit
72fb2a7edc
2 changed files with 6 additions and 3 deletions
|
@ -15,9 +15,9 @@ void Config::set(const std::string & name, const std::string & value)
|
|||
|
||||
void Config::addSetting(AbstractSetting * setting)
|
||||
{
|
||||
_settings.emplace(setting->name, Config::SettingData{false, setting});
|
||||
_settings.emplace(setting->name, Config::SettingData(false, setting));
|
||||
for (auto & alias : setting->aliases)
|
||||
_settings.emplace(alias, Config::SettingData{true, setting});
|
||||
_settings.emplace(alias, Config::SettingData(true, setting));
|
||||
|
||||
bool set = false;
|
||||
|
||||
|
|
|
@ -33,8 +33,11 @@ class Config
|
|||
|
||||
struct SettingData
|
||||
{
|
||||
bool isAlias = false;
|
||||
bool isAlias;
|
||||
AbstractSetting * setting;
|
||||
SettingData(bool isAlias, AbstractSetting * setting)
|
||||
: isAlias(isAlias), setting(setting)
|
||||
{ }
|
||||
};
|
||||
|
||||
std::map<std::string, SettingData> _settings;
|
||||
|
|
Loading…
Reference in a new issue