From c85738574cc71eccd97cf51fe101cfa53ef7f89f Mon Sep 17 00:00:00 2001 From: zjeffer <4633209+zjeffer@users.noreply.github.com> Date: Sun, 16 Jul 2023 15:05:42 +0200 Subject: [PATCH 1/2] Use C++20 by default --- .github/workflows/linux.yml | 2 +- meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 1c00a5ed..d97612d5 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -13,7 +13,7 @@ jobs: - fedora - opensuse - gentoo - cpp_std: [c++17] + cpp_std: [c++20] include: - distro: fedora cpp_std: c++20 diff --git a/meson.build b/meson.build index f8b4a2d6..6e188c46 100644 --- a/meson.build +++ b/meson.build @@ -4,7 +4,7 @@ project( license: 'MIT', meson_version: '>= 0.50.0', default_options : [ - 'cpp_std=c++17', + 'cpp_std=c++20', 'buildtype=release', 'default_library=static' ], From 62702a4878939cd523b99fc5a9abc9d4719f69ae Mon Sep 17 00:00:00 2001 From: zjeffer <4633209+zjeffer@users.noreply.github.com> Date: Sun, 16 Jul 2023 15:18:18 +0200 Subject: [PATCH 2/2] fixed lint --- src/modules/backlight.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/modules/backlight.cpp b/src/modules/backlight.cpp index a595073e..27871048 100644 --- a/src/modules/backlight.cpp +++ b/src/modules/backlight.cpp @@ -190,9 +190,8 @@ auto waybar::modules::Backlight::update() -> void { event_box_.show(); const uint8_t percent = best->get_max() == 0 ? 100 : round(best->get_actual() * 100.0f / best->get_max()); - std::string desc = - fmt::format(fmt::runtime(format_), fmt::arg("percent", percent), - fmt::arg("icon", getIcon(percent))); + std::string desc = fmt::format(fmt::runtime(format_), fmt::arg("percent", percent), + fmt::arg("icon", getIcon(percent))); label_.set_markup(desc); getState(percent); if (tooltipEnabled()) {