From d9f818def89fa19e300eb4c83b41d1a74c78e0ee Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" Date: Tue, 18 Sep 2018 00:45:52 +0200 Subject: [PATCH] Use reference in for loop for type with non-trivial copy constructor Seen by clazy range-loop --- src/kselectionproxymodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kselectionproxymodel.cpp b/src/kselectionproxymodel.cpp index 167fc58..60bc45a 100644 --- a/src/kselectionproxymodel.cpp +++ b/src/kselectionproxymodel.cpp @@ -1110,7 +1110,7 @@ bool KSelectionProxyModelPrivate::rootWillBeRemoved(const QItemSelection &select { Q_ASSERT(root.isValid()); - for (auto r : selection) { + for (auto& r : selection) { if (m_includeAllSelected) { if (r.parent() == root.parent() && root.row() <= r.bottom() && root.row() >= r.top()) { return true;