clean up if statement for battery percent calculation

This commit is contained in:
jkre 2023-12-14 00:16:15 +01:00
parent f6d8c4a044
commit b09f352c09

View file

@ -771,7 +771,7 @@ namespace Cpu {
catch (const std::invalid_argument&) { }
catch (const std::out_of_range&) { }
}
if (b.use_energy_or_charge == true and percent < 0) {
if (b.use_energy_or_charge and percent < 0) {
try {
percent = round(100.0 * stoll(readfile(b.charge_now, "-1")) / stoll(readfile(b.charge_full, "1")));
}