summaryrefslogtreecommitdiff
path: root/src/desktop/Window.cpp
diff options
context:
space:
mode:
authorTom Englund <tomenglund26@gmail.com>2025-02-06 12:18:04 +0100
committerGitHub <noreply@github.com>2025-02-06 11:18:04 +0000
commitf1e32cd122ad64ba7119ee7fe65f7c1074a65b91 (patch)
treefa6f884bcdd1c876c2fb15ef496ee4bc16d936f0 /src/desktop/Window.cpp
parent868b2b544abb61764089b0e4e9b0fd153a9db26f (diff)
core: avoid .at() and use [] operator (#9347)
avoid .at() where it makes sense and use [] operator in loops.
Diffstat (limited to 'src/desktop/Window.cpp')
-rw-r--r--src/desktop/Window.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/desktop/Window.cpp b/src/desktop/Window.cpp
index b5126b67..8f6d2cb5 100644
--- a/src/desktop/Window.cpp
+++ b/src/desktop/Window.cpp
@@ -1626,17 +1626,17 @@ PHLWINDOW CWindow::getSwallower() {
if (!(*PSWALLOWREGEX).empty())
std::erase_if(candidates, [&](const auto& other) { return !RE2::FullMatch(other->m_szClass, *PSWALLOWREGEX); });
- if (candidates.size() <= 0)
+ if (candidates.size() == 0)
return nullptr;
if (!(*PSWALLOWEXREGEX).empty())
std::erase_if(candidates, [&](const auto& other) { return RE2::FullMatch(other->m_szTitle, *PSWALLOWEXREGEX); });
- if (candidates.size() <= 0)
+ if (candidates.size() == 0)
return nullptr;
if (candidates.size() == 1)
- return candidates.at(0);
+ return candidates[0];
// walk up the focus history and find the last focused
for (auto const& w : g_pCompositor->m_vWindowFocusHistory) {
@@ -1648,7 +1648,7 @@ PHLWINDOW CWindow::getSwallower() {
}
// if none are found (??) then just return the first one
- return candidates.at(0);
+ return candidates[0];
}
void CWindow::unsetWindowData(eOverridePriority priority) {