config: Integrate HASCONFIG into CConfigManager::getConfigValueSafeDevice (#3195)
This commit is contained in:
parent
a15e3e1f38
commit
60c01dab01
2 changed files with 34 additions and 54 deletions
|
|
@ -1691,13 +1691,15 @@ SConfigValue CConfigManager::getConfigValueSafeDevice(const std::string& dev, co
|
|||
const auto it = deviceConfigs.find(dev);
|
||||
|
||||
if (it == deviceConfigs.end()) {
|
||||
Debug::log(ERR, "getConfigValueSafeDevice: No device config for {} found???", dev.c_str());
|
||||
return SConfigValue();
|
||||
if (fallback.empty()) {
|
||||
Debug::log(ERR, "getConfigValueSafeDevice: No device config for {} found???", dev.c_str());
|
||||
return SConfigValue();
|
||||
}
|
||||
return configValues[fallback];
|
||||
}
|
||||
|
||||
const SConfigValue DEVICECONFIG = it->second[val];
|
||||
|
||||
// fallback if not set explicitly
|
||||
if (!DEVICECONFIG.set && !fallback.empty()) {
|
||||
return configValues[fallback];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue