Fix build on gcc 4.9

http://hydra.nixos.org/build/52408843
This commit is contained in:
Eelco Dolstra 2017-05-03 16:08:48 +02:00
parent 08355643ab
commit 72fb2a7edc
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
2 changed files with 6 additions and 3 deletions

View file

@ -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;

View file

@ -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;