style: clang-format the crash-fix changes

This commit is contained in:
Alex
2026-07-04 03:17:33 +02:00
parent 6672e924df
commit 5c06233340
3 changed files with 20 additions and 21 deletions
+9 -9
View File
@@ -447,10 +447,9 @@ auto waybar::modules::Clock::get_calendar(const year_month_day& today, const yea
(line == 2) (line == 2)
? static_cast<const zoned_seconds&&>( ? static_cast<const zoned_seconds&&>(
zoned_seconds{tz, local_days{ymTmp / 1}, choose::earliest}) zoned_seconds{tz, local_days{ymTmp / 1}, choose::earliest})
: static_cast<const zoned_seconds&&>( : static_cast<const zoned_seconds&&>(zoned_seconds{
zoned_seconds{tz, tz, local_days{cldGetWeekForLine(ymTmp, firstdow, line)},
local_days{cldGetWeekForLine(ymTmp, firstdow, line)}, choose::earliest})))
choose::earliest})))
<< ' '; << ' ';
} else { } else {
os << pads; os << pads;
@@ -489,11 +488,12 @@ auto waybar::modules::Clock::get_calendar(const year_month_day& today, const yea
<< fmt_lib::vformat( << fmt_lib::vformat(
m_locale_, fmtMap_[4], m_locale_, fmtMap_[4],
fmt_lib::make_format_args( fmt_lib::make_format_args(
(line == 2) ? static_cast<const zoned_seconds&&>(zoned_seconds{ (line == 2)
tz, local_days{ymTmp / 1}, choose::earliest}) ? static_cast<const zoned_seconds&&>(
: static_cast<const zoned_seconds&&>(zoned_seconds{ zoned_seconds{tz, local_days{ymTmp / 1}, choose::earliest})
tz, local_days{cldGetWeekForLine(ymTmp, firstdow, line)}, : static_cast<const zoned_seconds&&>(zoned_seconds{
choose::earliest}))); tz, local_days{cldGetWeekForLine(ymTmp, firstdow, line)},
choose::earliest})));
else else
os << pads; os << pads;
} }
+1 -2
View File
@@ -105,8 +105,7 @@ void waybar::modules::Custom::continuousWorker() {
dp.emit(); dp.emit();
spdlog::error("{} stopped unexpectedly, is it endless?", name_); spdlog::error("{} stopped unexpectedly, is it endless?", name_);
} }
if (config_["restart-interval"].isNumeric() && if (config_["restart-interval"].isNumeric() && config_["restart-interval"].asDouble() > 0) {
config_["restart-interval"].asDouble() > 0) {
pid_ = -1; pid_ = -1;
thread_.sleep_for(std::chrono::milliseconds( thread_.sleep_for(std::chrono::milliseconds(
std::max(1L, // Minimum 1ms due to millisecond precision std::max(1L, // Minimum 1ms due to millisecond precision
+10 -10
View File
@@ -38,18 +38,18 @@ auto Language::update() -> void {
std::string layoutName = std::string{}; std::string layoutName = std::string{};
if (config_.isMember("format-" + layout_.short_description + "-" + layout_.variant)) { if (config_.isMember("format-" + layout_.short_description + "-" + layout_.variant)) {
const auto propName = "format-" + layout_.short_description + "-" + layout_.variant; const auto propName = "format-" + layout_.short_description + "-" + layout_.variant;
layoutName = trim(fmt::format(fmt::runtime(format_), config_[propName].asString(), layoutName =
fmt::arg("long", layout_.full_name), trim(fmt::format(fmt::runtime(format_), config_[propName].asString(),
fmt::arg("short", layout_.short_name), fmt::arg("long", layout_.full_name), fmt::arg("short", layout_.short_name),
fmt::arg("shortDescription", layout_.short_description), fmt::arg("shortDescription", layout_.short_description),
fmt::arg("variant", layout_.variant))); fmt::arg("variant", layout_.variant)));
} else if (config_.isMember("format-" + layout_.short_description)) { } else if (config_.isMember("format-" + layout_.short_description)) {
const auto propName = "format-" + layout_.short_description; const auto propName = "format-" + layout_.short_description;
layoutName = trim(fmt::format(fmt::runtime(format_), config_[propName].asString(), layoutName =
fmt::arg("long", layout_.full_name), trim(fmt::format(fmt::runtime(format_), config_[propName].asString(),
fmt::arg("short", layout_.short_name), fmt::arg("long", layout_.full_name), fmt::arg("short", layout_.short_name),
fmt::arg("shortDescription", layout_.short_description), fmt::arg("shortDescription", layout_.short_description),
fmt::arg("variant", layout_.variant))); fmt::arg("variant", layout_.variant)));
} else { } else {
layoutName = trim(fmt::format(fmt::runtime(format_), fmt::arg("long", layout_.full_name), layoutName = trim(fmt::format(fmt::runtime(format_), fmt::arg("long", layout_.full_name),
fmt::arg("short", layout_.short_name), fmt::arg("short", layout_.short_name),