From 8d6c18076f3268a6c85c6085d29f898267028101 Mon Sep 17 00:00:00 2001 From: Tom Englund Date: Mon, 26 Aug 2024 17:25:39 +0200 Subject: core: make most for loops use const references (#7527) why not let the compiler optimise things for us at hyprspeeds when we can. --- src/managers/SessionLockManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/managers/SessionLockManager.cpp') 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 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; -- cgit v1.2.3