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/helpers/AnimatedVariable.hpp | 12 +++++------- src/helpers/Monitor.hpp | 2 +- src/helpers/WLSurface.hpp | 6 +++--- src/helpers/Workspace.cpp | 4 ++-- src/helpers/XWaylandStubs.hpp | 3 +-- 5 files changed, 12 insertions(+), 15 deletions(-) (limited to 'src/helpers') diff --git a/src/helpers/AnimatedVariable.hpp b/src/helpers/AnimatedVariable.hpp index 059e892d..d87273b3 100644 --- a/src/helpers/AnimatedVariable.hpp +++ b/src/helpers/AnimatedVariable.hpp @@ -8,16 +8,14 @@ #include "../macros.hpp" #include "../debug/Log.hpp" -enum ANIMATEDVARTYPE -{ +enum ANIMATEDVARTYPE { AVARTYPE_INVALID = -1, AVARTYPE_FLOAT, AVARTYPE_VECTOR, AVARTYPE_COLOR }; -enum AVARDAMAGEPOLICY -{ +enum AVARDAMAGEPOLICY { AVARDAMAGE_NONE = -1, AVARDAMAGE_ENTIRE = 0, AVARDAMAGE_BORDER, @@ -37,10 +35,10 @@ class CAnimatedVariable { void create(ANIMATEDVARTYPE, SAnimationPropertyConfig*, void* pWindow, AVARDAMAGEPOLICY); void create(ANIMATEDVARTYPE, std::any val, SAnimationPropertyConfig*, void* pWindow, AVARDAMAGEPOLICY); - CAnimatedVariable(const CAnimatedVariable&) = delete; - CAnimatedVariable(CAnimatedVariable&&) = delete; + CAnimatedVariable(const CAnimatedVariable&) = delete; + CAnimatedVariable(CAnimatedVariable&&) = delete; CAnimatedVariable& operator=(const CAnimatedVariable&) = delete; - CAnimatedVariable& operator=(CAnimatedVariable&&) = delete; + CAnimatedVariable& operator=(CAnimatedVariable&&) = delete; ~CAnimatedVariable(); diff --git a/src/helpers/Monitor.hpp b/src/helpers/Monitor.hpp index 7621ac17..f44e2c16 100644 --- a/src/helpers/Monitor.hpp +++ b/src/helpers/Monitor.hpp @@ -42,7 +42,7 @@ class CMonitor { int activeWorkspace = -1; float scale = 1; - std::string szName = ""; + std::string szName = ""; std::string szDescription = ""; Vector2D vecReservedTopLeft = Vector2D(0, 0); diff --git a/src/helpers/WLSurface.hpp b/src/helpers/WLSurface.hpp index 8b4ef835..faef4353 100644 --- a/src/helpers/WLSurface.hpp +++ b/src/helpers/WLSurface.hpp @@ -13,10 +13,10 @@ class CWLSurface { void assign(wlr_surface* pSurface); void unassign(); - CWLSurface(const CWLSurface&) = delete; - CWLSurface(CWLSurface&&) = delete; + CWLSurface(const CWLSurface&) = delete; + CWLSurface(CWLSurface&&) = delete; CWLSurface& operator=(const CWLSurface&) = delete; - CWLSurface& operator=(CWLSurface&&) = delete; + CWLSurface& operator=(CWLSurface&&) = delete; wlr_surface* wlr() const; bool exists() const; diff --git a/src/helpers/Workspace.cpp b/src/helpers/Workspace.cpp index c027688e..213607d0 100644 --- a/src/helpers/Workspace.cpp +++ b/src/helpers/Workspace.cpp @@ -90,7 +90,7 @@ void CWorkspace::startAnim(bool in, bool left, bool instant) { } } else if (ANIMSTYLE == "slidevert") { // fallback is slide - const auto PMONITOR = g_pCompositor->getMonitorFromID(m_iMonitorID); + const auto PMONITOR = g_pCompositor->getMonitorFromID(m_iMonitorID); const auto YDISTANCE = PMONITOR->vecSize.y + *PWORKSPACEGAP; m_fAlpha.setValueAndWarp(1.f); // fix a bug, if switching from fade -> slide. @@ -103,7 +103,7 @@ void CWorkspace::startAnim(bool in, bool left, bool instant) { } } else { // fallback is slide - const auto PMONITOR = g_pCompositor->getMonitorFromID(m_iMonitorID); + const auto PMONITOR = g_pCompositor->getMonitorFromID(m_iMonitorID); const auto XDISTANCE = PMONITOR->vecSize.x + *PWORKSPACEGAP; m_fAlpha.setValueAndWarp(1.f); // fix a bug, if switching from fade -> slide. diff --git a/src/helpers/XWaylandStubs.hpp b/src/helpers/XWaylandStubs.hpp index 904867cf..89e0b41f 100644 --- a/src/helpers/XWaylandStubs.hpp +++ b/src/helpers/XWaylandStubs.hpp @@ -28,8 +28,7 @@ typedef struct { } xcb_size_hints_t; typedef unsigned int xcb_window_t; -typedef enum xcb_stack_mode_t -{ +typedef enum xcb_stack_mode_t { XCB_STACK_MODE_ABOVE = 0, XCB_STACK_MODE_BELOW = 1, XCB_STACK_MODE_TOP_IF = 2, -- cgit v1.2.3