aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/helpers
diff options
context:
space:
mode:
authorTom Englund <[email protected]>2024-08-26 17:25:39 +0200
committerGitHub <[email protected]>2024-08-26 17:25:39 +0200
commit8d6c18076f3268a6c85c6085d29f898267028101 (patch)
tree9db19e850b0a3e2c5d20d5ca2ad5f9878eca89b1 /src/helpers
parent9c5a37a797ea1f1829859ab5b07016b2f27f739c (diff)
downloadHyprland-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.cpp4
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();
}