Apply clang-tidy inspections

This commit is contained in:
pixl
2020-07-14 00:12:40 -04:00
parent 937225b6f2
commit d3d4a2755a
23 changed files with 94 additions and 90 deletions
+5 -2
View File
@@ -113,7 +113,10 @@ void Device::_makeResetMechanism()
try {
hidpp20::Reset reset(&_hidpp20);
_reset_mechanism = std::make_unique<std::function<void()>>(
[dev=&this->_hidpp20]{ hidpp20::Reset(dev).reset(); });
[dev=&this->_hidpp20]{
hidpp20::Reset reset(dev);
reset.reset(reset.getProfile());
});
} catch(hidpp20::UnsupportedFeature& e) {
// Reset unsupported, ignore.
}
@@ -130,7 +133,7 @@ DeviceConfig::DeviceConfig(const std::shared_ptr<Configuration>& config, Device*
}
}
libconfig::Setting& DeviceConfig::getSetting(std::string path)
libconfig::Setting& DeviceConfig::getSetting(const std::string& path)
{
return _config->getSetting(_root_setting + '/' + path);
}