diff options
author | Tom Englund <[email protected]> | 2024-08-26 17:25:39 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2024-08-26 17:25:39 +0200 |
commit | 8d6c18076f3268a6c85c6085d29f898267028101 (patch) | |
tree | 9db19e850b0a3e2c5d20d5ca2ad5f9878eca89b1 /src/render/OpenGL.cpp | |
parent | 9c5a37a797ea1f1829859ab5b07016b2f27f739c (diff) | |
download | Hyprland-8d6c18076f3268a6c85c6085d29f898267028101.tar.gz Hyprland-8d6c18076f3268a6c85c6085d29f898267028101.zip |
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/render/OpenGL.cpp')
-rw-r--r-- | src/render/OpenGL.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index 63cc2203..2aeda8be 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -690,7 +690,7 @@ bool CHyprOpenGLImpl::passRequiresIntrospection(CMonitor* pMonitor) { } if (*PBLURSPECIAL) { - for (auto& ws : g_pCompositor->m_vWorkspaces) { + for (auto const& ws : g_pCompositor->m_vWorkspaces) { if (!ws->m_bIsSpecialWorkspace || ws->m_iMonitorID != pMonitor->ID) continue; @@ -1936,9 +1936,9 @@ void CHyprOpenGLImpl::preRender(CMonitor* pMonitor) { } } - for (auto& m : g_pCompositor->m_vMonitors) { - for (auto& lsl : m->m_aLayerSurfaceLayers) { - for (auto& ls : lsl) { + for (auto const& m : g_pCompositor->m_vMonitors) { + for (auto const& lsl : m->m_aLayerSurfaceLayers) { + for (auto const& ls : lsl) { if (!ls->layerSurface || ls->xray != 1) continue; |