Use reference in for loop for type with non-trivial copy constructor

Seen by clazy range-loop
wilder
Friedrich W. H. Kossebau 8 years ago
parent c0ad3cab8f
commit d9f818def8
  1. 2
      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;

Loading…
Cancel
Save