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
+5 -5
View File
@@ -447,9 +447,8 @@ auto waybar::modules::Clock::get_calendar(const year_month_day& today, const yea
(line == 2)
? static_cast<const zoned_seconds&&>(
zoned_seconds{tz, local_days{ymTmp / 1}, choose::earliest})
: static_cast<const zoned_seconds&&>(
zoned_seconds{tz,
local_days{cldGetWeekForLine(ymTmp, firstdow, line)},
: static_cast<const zoned_seconds&&>(zoned_seconds{
tz, local_days{cldGetWeekForLine(ymTmp, firstdow, line)},
choose::earliest})))
<< ' ';
} else {
@@ -489,8 +488,9 @@ auto waybar::modules::Clock::get_calendar(const year_month_day& today, const yea
<< fmt_lib::vformat(
m_locale_, fmtMap_[4],
fmt_lib::make_format_args(
(line == 2) ? static_cast<const zoned_seconds&&>(zoned_seconds{
tz, local_days{ymTmp / 1}, choose::earliest})
(line == 2)
? static_cast<const zoned_seconds&&>(
zoned_seconds{tz, local_days{ymTmp / 1}, choose::earliest})
: static_cast<const zoned_seconds&&>(zoned_seconds{
tz, local_days{cldGetWeekForLine(ymTmp, firstdow, line)},
choose::earliest})));
+1 -2
View File
@@ -105,8 +105,7 @@ void waybar::modules::Custom::continuousWorker() {
dp.emit();
spdlog::error("{} stopped unexpectedly, is it endless?", name_);
}
if (config_["restart-interval"].isNumeric() &&
config_["restart-interval"].asDouble() > 0) {
if (config_["restart-interval"].isNumeric() && config_["restart-interval"].asDouble() > 0) {
pid_ = -1;
thread_.sleep_for(std::chrono::milliseconds(
std::max(1L, // Minimum 1ms due to millisecond precision
+6 -6
View File
@@ -38,16 +38,16 @@ auto Language::update() -> void {
std::string layoutName = std::string{};
if (config_.isMember("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(),
fmt::arg("long", layout_.full_name),
fmt::arg("short", layout_.short_name),
layoutName =
trim(fmt::format(fmt::runtime(format_), config_[propName].asString(),
fmt::arg("long", layout_.full_name), fmt::arg("short", layout_.short_name),
fmt::arg("shortDescription", layout_.short_description),
fmt::arg("variant", layout_.variant)));
} else if (config_.isMember("format-" + layout_.short_description)) {
const auto propName = "format-" + layout_.short_description;
layoutName = trim(fmt::format(fmt::runtime(format_), config_[propName].asString(),
fmt::arg("long", layout_.full_name),
fmt::arg("short", layout_.short_name),
layoutName =
trim(fmt::format(fmt::runtime(format_), config_[propName].asString(),
fmt::arg("long", layout_.full_name), fmt::arg("short", layout_.short_name),
fmt::arg("shortDescription", layout_.short_description),
fmt::arg("variant", layout_.variant)));
} else {