From 6946288053e5d32731e65ac88289f99d5a2f1080 Mon Sep 17 00:00:00 2001 From: Viktar Lukashonak Date: Thu, 17 Mar 2022 11:31:06 +0300 Subject: [PATCH] PR #1485 review --- src/modules/temperature.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/modules/temperature.cpp b/src/modules/temperature.cpp index 86aea70a..627ece90 100644 --- a/src/modules/temperature.cpp +++ b/src/modules/temperature.cpp @@ -3,11 +3,6 @@ waybar::modules::Temperature::Temperature(const std::string& id, const Json::Value& config) : ALabel(config, "temperature", id, "{temperatureC}°C", 10) { - if (config_["format"].asString().empty() && config_["format-critical"].asString().empty()) { - throw std::runtime_error("Format configuration is not defined"); - } else if (config_["format"].asString().empty()) { - format_.clear(); - } if (config_["hwmon-path"].isString()) { file_path_ = config_["hwmon-path"].asString(); } else if (config_["hwmon-path-abs"].isString() && config_["input-filename"].isString()) { @@ -40,8 +35,7 @@ auto waybar::modules::Temperature::update() -> void { label_.get_style_context()->remove_class("critical"); } - if(format.empty()) - { + if(format.empty()) { event_box_.hide(); return; } else {