fix: lint

This commit is contained in:
Alex 2024-02-19 23:07:50 +01:00
parent ae1e11db22
commit bd0bf836c7
2 changed files with 4 additions and 3 deletions

View File

@ -129,7 +129,6 @@ waybar::modules::Clock::Clock(const std::string& id, const Json::Value& config)
};
}
auto waybar::modules::Clock::update() -> void {
auto tz{tzList_[tzCurrIdx_] ?: current_zone()};
const zoned_time now{tz, floor<seconds>(system_clock::now())};
@ -150,7 +149,8 @@ auto waybar::modules::Clock::update() -> void {
tlpText_ = std::regex_replace(tlpFmt_, std::regex("\\{" + kTZPlaceholder + "\\}"), tzText_);
tlpText_ =
std::regex_replace(tlpText_, std::regex("\\{" + kCldPlaceholder + "\\}"), cldText_);
tlpText_ = std::regex_replace(tlpText_, std::regex("\\{" + kOrdPlaceholder + "\\}"), ordText_);
tlpText_ =
std::regex_replace(tlpText_, std::regex("\\{" + kOrdPlaceholder + "\\}"), ordText_);
}
tlpText_ = fmt_lib::vformat(locale_, tlpText_, fmt_lib::make_format_args(shiftedNow));

View File

@ -24,7 +24,8 @@ waybar::modules::Temperature::Temperature(const std::string& id, const Json::Val
}
}
} else if (config_["hwmon-path-abs"].isString() && config_["input-filename"].isString()) {
for (const auto& hwmon : std::filesystem::directory_iterator(config_["hwmon-path-abs"].asString())) {
for (const auto& hwmon :
std::filesystem::directory_iterator(config_["hwmon-path-abs"].asString())) {
if (hwmon.path().filename().string().starts_with("hwmon")) {
file_path_ = hwmon.path().string() + "/" + config_["input-filename"].asString();
break;