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/helpers | |
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/helpers')
-rw-r--r-- | src/helpers/Monitor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index 2c6282e1..8b533d8a 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -207,7 +207,7 @@ void CMonitor::onConnect(bool noRule) { // verify last mon valid bool found = false; - for (auto& m : g_pCompositor->m_vMonitors) { + for (auto const& m : g_pCompositor->m_vMonitors) { if (m == g_pCompositor->m_pLastMonitor) { found = true; break; @@ -272,7 +272,7 @@ void CMonitor::onDisconnect(bool destroy) { listeners.commit.reset(); for (size_t i = 0; i < 4; ++i) { - for (auto& ls : m_aLayerSurfaceLayers[i]) { + for (auto const& ls : m_aLayerSurfaceLayers[i]) { if (ls->layerSurface && !ls->fadingOut) ls->layerSurface->sendClosed(); } |