mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-17 04:53:48 -07:00
core: make most for loops use const references (#7527)
why not let the compiler optimise things for us at hyprspeeds when we can.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user