From 4a42344e9748d2b44c55798ddc3fa41448533c4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Conzelmann?= <45296195+zephvr@users.noreply.github.com> Date: Wed, 6 Dec 2023 23:54:56 +0100 Subject: style/ci: apply clang-format and verify it in ci (#4039) * style: apply clang-format * ci: add new clang-format job to CI --- src/macros.hpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/macros.hpp') diff --git a/src/macros.hpp b/src/macros.hpp index c2eb98db..19b4cbc6 100644 --- a/src/macros.hpp +++ b/src/macros.hpp @@ -44,7 +44,7 @@ if (!(expr)) { \ Debug::log(CRIT, "\n==========================================================================================\nASSERTION FAILED! \n\n{}\n\nat: line {} in {}", \ std::format(reason, ##__VA_ARGS__), __LINE__, \ - ([]() constexpr->std::string { return std::string(__FILE__).substr(std::string(__FILE__).find_last_of('/') + 1); })()); \ + ([]() constexpr -> std::string { return std::string(__FILE__).substr(std::string(__FILE__).find_last_of('/') + 1); })()); \ printf("Assertion failed! See the log in /tmp/hypr/hyprland.log for more info."); \ raise(SIGABRT); \ } @@ -63,9 +63,7 @@ } #define FORMAT_FLAG(spec__, flag__) \ - case spec__: \ - (flag__) = true; \ - break; + case spec__: (flag__) = true; break; #define FORMAT_NUMBER(buf__) \ case '0': \ @@ -77,9 +75,7 @@ case '6': \ case '7': \ case '8': \ - case '9': \ - (buf__).push_back(*it); \ - break; + case '9': (buf__).push_back(*it); break; #if ISDEBUG #define UNREACHABLE() \ -- cgit v1.2.3