diff --git a/src/modules/hyprland/workspaces.cpp b/src/modules/hyprland/workspaces.cpp index 6868f8c991..7ad87bab54 100644 --- a/src/modules/hyprland/workspaces.cpp +++ b/src/modules/hyprland/workspaces.cpp @@ -201,7 +201,7 @@ auto Workspaces::update() -> void { } bool anyWindowCreated = false; - std::vector not_created; + std::vector notCreated; for (auto &windowPayload : m_windowsToCreate) { bool created = false; @@ -213,9 +213,9 @@ auto Workspaces::update() -> void { } } if (!created) { - static auto const windowCreationTimeout = 2; - if (windowPayload.incrementTimeSpentUncreated() < windowCreationTimeout) { - not_created.push_back(windowPayload); + static auto const WINDOW_CREATION_TIMEOUT = 2; + if (windowPayload.incrementTimeSpentUncreated() < WINDOW_CREATION_TIMEOUT) { + notCreated.push_back(windowPayload); } } } @@ -225,7 +225,7 @@ auto Workspaces::update() -> void { } m_windowsToCreate.clear(); - m_windowsToCreate = not_created; + m_windowsToCreate = notCreated; AModule::update(); } @@ -955,12 +955,12 @@ void WindowCreationPayload::clearAddr() { // 0x{ADDR} // While Hyprland's IPC follows this format: // {ADDR} - static const std::string addrPrefix = "0x"; - static const int addrPrefixLen = addrPrefix.length(); + static const std::string ADDR_PREFIX = "0x"; + static const int ADDR_PREFIX_LEN = ADDR_PREFIX.length(); - if (m_windowAddress.starts_with(addrPrefix)) { + if (m_windowAddress.starts_with(ADDR_PREFIX)) { m_windowAddress = - m_windowAddress.substr(addrPrefixLen, m_windowAddress.length() - addrPrefixLen); + m_windowAddress.substr(ADDR_PREFIX_LEN, m_windowAddress.length() - ADDR_PREFIX_LEN); } } @@ -970,12 +970,12 @@ void WindowCreationPayload::clearWorkspaceName() { // special qualifier. The reasoning is that not all of Hyprland's IPC events // use this qualifier, so it's better to be consistent about our uses. - static const std::string specialQualifierPrefix = "special:"; - static const int specialQualifierPrefixLen = specialQualifierPrefix.length(); + static const std::string SPECIAL_QUALIFIER_PREFIX = "special:"; + static const int SPECIAL_QUALIFIER_PREFIX_LEN = SPECIAL_QUALIFIER_PREFIX.length(); - if (m_workspaceName.starts_with(specialQualifierPrefix)) { - m_workspaceName = m_workspaceName.substr(specialQualifierPrefixLen, - m_workspaceName.length() - specialQualifierPrefixLen); + if (m_workspaceName.starts_with(SPECIAL_QUALIFIER_PREFIX)) { + m_workspaceName = m_workspaceName.substr( + SPECIAL_QUALIFIER_PREFIX_LEN, m_workspaceName.length() - SPECIAL_QUALIFIER_PREFIX_LEN); } }