Enable compatibility with older versions of libconfig (such as the one shipped with RHEL/CentOS 7)

This commit is contained in:
Kevin Abraham
2020-11-22 12:12:29 -05:00
parent 4c582241d5
commit 28a93b2df4
13 changed files with 44 additions and 44 deletions
+2 -2
View File
@@ -98,7 +98,7 @@ Configuration::Configuration(const std::string& config_file)
}
try {
auto& ignore = root.lookup("ignore");
auto& ignore = root["ignore"];
if(ignore.getType() == libconfig::Setting::TypeInt) {
_ignore_list.insert((int)ignore);
} else if(ignore.isList() || ignore.isArray()) {
@@ -116,7 +116,7 @@ Configuration::Configuration(const std::string& config_file)
} catch(const SettingNotFoundException& e) {
// May be called blacklist
try {
auto& ignore = root.lookup("blacklist");
auto& ignore = root["blacklist"];
if(ignore.getType() == libconfig::Setting::TypeInt) {
_ignore_list.insert((int)ignore);
} else if(ignore.isList() || ignore.isArray()) {