diff options
| author | Tom Englund <tomenglund26@gmail.com> | 2024-08-26 17:25:39 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-26 17:25:39 +0200 |
| commit | 8d6c18076f3268a6c85c6085d29f898267028101 (patch) | |
| tree | 9db19e850b0a3e2c5d20d5ca2ad5f9878eca89b1 /src/managers/SessionLockManager.cpp | |
| parent | 9c5a37a797ea1f1829859ab5b07016b2f27f739c (diff) | |
core: make most for loops use const references (#7527)
why not let the compiler optimise things for us at hyprspeeds when we
can.
Diffstat (limited to 'src/managers/SessionLockManager.cpp')
| -rw-r--r-- | src/managers/SessionLockManager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/managers/SessionLockManager.cpp b/src/managers/SessionLockManager.cpp index a82432a8..86108cac 100644 --- a/src/managers/SessionLockManager.cpp +++ b/src/managers/SessionLockManager.cpp @@ -137,7 +137,7 @@ bool CSessionLockManager::isSurfaceSessionLock(SP<CWLSurfaceResource> pSurface) if (!m_pSessionLock) return false; - for (auto& sls : m_pSessionLock->vSessionLockSurfaces) { + for (auto const& sls : m_pSessionLock->vSessionLockSurfaces) { if (sls->surface->surface() == pSurface) return true; } @@ -154,7 +154,7 @@ void CSessionLockManager::removeSessionLockSurface(SSessionLockSurface* pSLS) { if (g_pCompositor->m_pLastFocus) return; - for (auto& sls : m_pSessionLock->vSessionLockSurfaces) { + for (auto const& sls : m_pSessionLock->vSessionLockSurfaces) { if (!sls->mapped) continue; |
