diff options
author | Vaxry <[email protected]> | 2024-12-07 18:51:18 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-12-07 18:51:18 +0100 |
commit | 8bbeee11734d3ba8e2cf15d19cb3c302f8bfdbf2 (patch) | |
tree | 5b6654818049a0743f62defc090e86d4327cccbb /src/desktop/Workspace.cpp | |
parent | b1e5cc66bdb20b002c93479490c3a317552210b3 (diff) | |
download | Hyprland-8bbeee11734d3ba8e2cf15d19cb3c302f8bfdbf2.tar.gz Hyprland-8bbeee11734d3ba8e2cf15d19cb3c302f8bfdbf2.zip |
core: Add clang-tidy (#8664)
This adds a .clang-tidy file for us.
It's not a strict requirement to be compliant, but I tuned it to be alright.
Diffstat (limited to 'src/desktop/Workspace.cpp')
-rw-r--r-- | src/desktop/Workspace.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/desktop/Workspace.cpp b/src/desktop/Workspace.cpp index 7c3d47d7..3bf89ec3 100644 --- a/src/desktop/Workspace.cpp +++ b/src/desktop/Workspace.cpp @@ -11,12 +11,9 @@ PHLWORKSPACE CWorkspace::create(WORKSPACEID id, PHLMONITOR monitor, std::string return workspace; } -CWorkspace::CWorkspace(WORKSPACEID id, PHLMONITOR monitor, std::string name, bool special, bool isEmpty) { - m_pMonitor = monitor; - m_iID = id; - m_szName = name; - m_bIsSpecialWorkspace = special; - m_bWasCreatedEmpty = isEmpty; +CWorkspace::CWorkspace(WORKSPACEID id, PHLMONITOR monitor, std::string name, bool special, bool isEmpty) : + m_iID(id), m_szName(name), m_pMonitor(monitor), m_bIsSpecialWorkspace(special), m_bWasCreatedEmpty(isEmpty) { + ; } void CWorkspace::init(PHLWORKSPACE self) { @@ -106,7 +103,7 @@ void CWorkspace::startAnim(bool in, bool left, bool instant) { const auto PMONITOR = m_pMonitor.lock(); float movePerc = 100.f; - if (ANIMSTYLE.find("%") != std::string::npos) { + if (ANIMSTYLE.find('%') != std::string::npos) { try { auto percstr = ANIMSTYLE.substr(ANIMSTYLE.find_last_of(' ') + 1); movePerc = std::stoi(percstr.substr(0, percstr.length() - 1)); @@ -296,7 +293,7 @@ bool CWorkspace::matchesStaticSelector(const std::string& selector_) { return false; } - const auto DASHPOS = prop.find("-"); + const auto DASHPOS = prop.find('-'); const auto LHS = prop.substr(0, DASHPOS), RHS = prop.substr(DASHPOS + 1); if (!isNumber(LHS) || !isNumber(RHS)) { @@ -433,7 +430,7 @@ bool CWorkspace::matchesStaticSelector(const std::string& selector_) { continue; } - const auto DASHPOS = prop.find("-"); + const auto DASHPOS = prop.find('-'); const auto LHS = prop.substr(0, DASHPOS), RHS = prop.substr(DASHPOS + 1); if (!isNumber(LHS) || !isNumber(RHS)) { |