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/layout/DwindleLayout.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/layout/DwindleLayout.cpp') diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index 20085ff7..db69cc04 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -49,7 +49,7 @@ void SDwindleNodeData::getAllChildrenRecursive(std::deque* pD int CHyprDwindleLayout::getNodesOnWorkspace(const WORKSPACEID& id) { int no = 0; - for (auto& n : m_lDwindleNodesData) { + for (auto const& n : m_lDwindleNodesData) { if (n.workspaceID == id && n.valid) ++no; } -- cgit v1.2.3