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
@@ -62,7 +62,7 @@ ChangeHostAction::Config::Config(Device *device, libconfig::Setting& config)
: Action::Config(device)
{
try {
auto& host = config.lookup("host");
auto& host = config["host"];
if(host.getType() == libconfig::Setting::TypeInt) {
_offset = false;
_host = host;
@@ -116,4 +116,4 @@ uint8_t ChangeHostAction::Config::nextHost(hidpp20::ChangeHost::HostInfo info)
} else
return _host;
}
}
}