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/input/IdleInhibitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/managers/input/IdleInhibitor.cpp') diff --git a/src/managers/input/IdleInhibitor.cpp b/src/managers/input/IdleInhibitor.cpp index 2c335a7e..4bcb4df3 100644 --- a/src/managers/input/IdleInhibitor.cpp +++ b/src/managers/input/IdleInhibitor.cpp @@ -31,7 +31,7 @@ void CInputManager::newIdleInhibitor(std::any inhibitor) { void CInputManager::recheckIdleInhibitorStatus() { - for (auto& ii : m_vIdleInhibitors) { + for (auto const& ii : m_vIdleInhibitors) { if (ii->nonDesktop) { PROTO::idle->setInhibit(true); return; -- cgit v1.2.3