Happy linter

This commit is contained in:
Viktar Lukashonak 2022-12-10 16:54:26 +03:00
parent 272c638f7e
commit a08967e008
No known key found for this signature in database
GPG Key ID: 08A413AA87200A6F
3 changed files with 2 additions and 3 deletions

View File

@ -500,7 +500,8 @@ const std::tuple<uint8_t, float, std::string, float> waybar::modules::Battery::g
} else if (status == "Discharging" && total_power_exists && total_energy_exists) {
if (total_power != 0) time_remaining = (float)total_energy / total_power;
} else if (status == "Charging" && time_to_full_now_exists) {
if (time_to_full_now_exists && (time_to_full_now != 0)) time_remaining = -(float)time_to_full_now / 1000.0f;
if (time_to_full_now_exists && (time_to_full_now != 0))
time_remaining = -(float)time_to_full_now / 1000.0f;
// If we've turned positive it means the battery is past 100% and so just report that as no
// time remaining
if (time_remaining > 0.0f) time_remaining = 0.0f;

View File

@ -103,7 +103,6 @@ void waybar::modules::MPD::setLabel() {
label_.hide();
}
if (tooltipEnabled()) {
std::string tooltip_format;
tooltip_format = config_["tooltip-format-disconnected"].isString()

View File

@ -118,7 +118,6 @@ auto Sndio::update() -> void {
label_.show();
}
ALabel::update();
}