fix the lint problem
This commit is contained in:
@@ -127,8 +127,8 @@ void waybar::modules::Battery::refreshBatteries() {
|
|||||||
if (!bat_defined && fs::exists(node.path() / "scope")) {
|
if (!bat_defined && fs::exists(node.path() / "scope")) {
|
||||||
std::string scope;
|
std::string scope;
|
||||||
try {
|
try {
|
||||||
//for hotplug-in device, access it is always unstable because you may remove the device anytime
|
// for hotplug-in device, access it is always unstable because you may remove the
|
||||||
//so just allow failure happen and do nothing
|
// device anytime so just allow failure happen and do nothing
|
||||||
std::ifstream(node.path() / "scope") >> scope;
|
std::ifstream(node.path() / "scope") >> scope;
|
||||||
} catch (const std::ifstream::failure& e) {
|
} catch (const std::ifstream::failure& e) {
|
||||||
scope.clear();
|
scope.clear();
|
||||||
|
|||||||
Reference in New Issue
Block a user