From 1c3746fc50c510cd987975cdd1827a3695d4daa1 Mon Sep 17 00:00:00 2001 From: Brenno Lemos Date: Sun, 22 Oct 2023 13:33:56 -0300 Subject: [PATCH] chore(style): clang-format --- src/Compositor.cpp | 4 ++-- src/config/ConfigManager.cpp | 4 ++-- src/config/ConfigManager.hpp | 26 +++++++++++++------------- src/helpers/MiscFunctions.cpp | 4 ++-- src/helpers/Workspace.hpp | 5 ++--- 5 files changed, 21 insertions(+), 22 deletions(-) diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 8db18684bb4..8f0b6f0c8b2 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -1194,8 +1194,8 @@ void CCompositor::sanityCheckWorkspaces() { continue; } - const auto& WORKSPACE = *it; - const auto WINDOWSONWORKSPACE = getWindowsOnWorkspace(WORKSPACE->m_iID); + const auto& WORKSPACE = *it; + const auto WINDOWSONWORKSPACE = getWindowsOnWorkspace(WORKSPACE->m_iID); if (WINDOWSONWORKSPACE == 0) { if (!isWorkspaceVisible(WORKSPACE->m_iID)) { diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 6edf73dfaa7..0fba90fcb5b 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -1173,10 +1173,10 @@ void CConfigManager::handleWorkspaceRules(const std::string& command, const std: rules = value.substr(WORKSPACE_DELIM + 1); } - const static std::string ruleOnCreatedEmtpy = "on-created-empty:"; + const static std::string ruleOnCreatedEmtpy = "on-created-empty:"; const static int ruleOnCreatedEmtpyLen = ruleOnCreatedEmtpy.length(); - auto assignRule = [&](std::string rule) { + auto assignRule = [&](std::string rule) { size_t delim = std::string::npos; if ((delim = rule.find("gapsin:")) != std::string::npos) wsRule.gapsIn = std::stoi(rule.substr(delim + 7)); diff --git a/src/config/ConfigManager.hpp b/src/config/ConfigManager.hpp index a6e68d9ce37..c6c726bfc8a 100644 --- a/src/config/ConfigManager.hpp +++ b/src/config/ConfigManager.hpp @@ -36,19 +36,19 @@ struct SConfigValue { }; struct SWorkspaceRule { - std::string monitor = ""; - std::string workspaceString = ""; - std::string workspaceName = ""; - int workspaceId = -1; - bool isDefault = false; - bool isPersistent = false; - std::optional gapsIn; - std::optional gapsOut; - std::optional borderSize; - std::optional border; - std::optional rounding; - std::optional decorate; - std::optional shadow; + std::string monitor = ""; + std::string workspaceString = ""; + std::string workspaceName = ""; + int workspaceId = -1; + bool isDefault = false; + bool isPersistent = false; + std::optional gapsIn; + std::optional gapsOut; + std::optional borderSize; + std::optional border; + std::optional rounding; + std::optional decorate; + std::optional shadow; std::optional onCreatedEmptyRunCmd; }; diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp index 286b64cc538..3cce73d2b1b 100644 --- a/src/helpers/MiscFunctions.cpp +++ b/src/helpers/MiscFunctions.cpp @@ -632,8 +632,8 @@ int64_t getPPIDof(int64_t pid) { return 0; #else - std::string dir = "/proc/" + std::to_string(pid) + "/status"; - FILE* infile; + std::string dir = "/proc/" + std::to_string(pid) + "/status"; + FILE* infile; infile = fopen(dir.c_str(), "r"); if (!infile) diff --git a/src/helpers/Workspace.hpp b/src/helpers/Workspace.hpp index f3ccd930967..a0bbb8157ff 100644 --- a/src/helpers/Workspace.hpp +++ b/src/helpers/Workspace.hpp @@ -4,8 +4,7 @@ #include #include "../defines.hpp" -enum eFullscreenMode : int8_t -{ +enum eFullscreenMode : int8_t { FULLSCREEN_INVALID = -1, FULLSCREEN_FULL = 0, FULLSCREEN_MAXIMIZED @@ -54,7 +53,7 @@ class CWorkspace { std::string m_szLastMonitor = ""; // Whether the user configured command for on-created-empty has been executed, if any - bool m_bOnCreatedEmptyExecuted = false; + bool m_bOnCreatedEmptyExecuted = false; void startAnim(bool in, bool left, bool instant = false); void setActive(bool on);