about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-05-03T14·08+0200
committerEelco Dolstra <edolstra@gmail.com>2017-05-03T14·08+0200
commit72fb2a7edc169fa480f3a3d8da5a9fd263868491 (patch)
treee45ae2e31286910f02ba08c6bb61e11805c8cc9c /src
parent08355643ab2811256b8d78265757d9aab216b38e (diff)
Fix build on gcc 4.9
http://hydra.nixos.org/build/52408843
Diffstat (limited to 'src')
-rw-r--r--src/libutil/config.cc4
-rw-r--r--src/libutil/config.hh5
2 files changed, 6 insertions, 3 deletions
diff --git a/src/libutil/config.cc b/src/libutil/config.cc
index 497afaa1fed4..f7a46bfee63f 100644
--- a/src/libutil/config.cc
+++ b/src/libutil/config.cc
@@ -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;
 
diff --git a/src/libutil/config.hh b/src/libutil/config.hh
index 91962109100d..77620d47d371 100644
--- a/src/libutil/config.hh
+++ b/src/libutil/config.hh
@@ -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;