From 429c6946c670f82db34ec8bf31323a053a2b5378 Mon Sep 17 00:00:00 2001 From: Mathew Sutcliffe Date: Thu, 10 Nov 2016 00:42:57 +0000 Subject: [PATCH] refs #800 Fixed making unnecessary copies. --- src/blackgui/guiutility.cpp | 2 +- src/blackmisc/htmlutils.h | 2 +- src/blackmisc/statusmessagelist.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/blackgui/guiutility.cpp b/src/blackgui/guiutility.cpp index 4798aab2b..6e23ad30b 100644 --- a/src/blackgui/guiutility.cpp +++ b/src/blackgui/guiutility.cpp @@ -331,7 +331,7 @@ namespace BlackGui QList CGuiUtility::indexToUniqueRows(const QModelIndexList &indexes) { QList rows; - for (const QModelIndex i : indexes) + for (const QModelIndex &i : indexes) { const int r = i.row(); if (rows.contains(r)) { continue; } diff --git a/src/blackmisc/htmlutils.h b/src/blackmisc/htmlutils.h index 9b05808b8..e76548753 100644 --- a/src/blackmisc/htmlutils.h +++ b/src/blackmisc/htmlutils.h @@ -26,7 +26,7 @@ namespace BlackMisc for (const Obj &obj : container) { QString rowHtml; - for (const CPropertyIndex index : indexes) + for (const CPropertyIndex &index : indexes) { rowHtml += "" + obj.propertyByIndex(index).toQString(true) + ""; } diff --git a/src/blackmisc/statusmessagelist.cpp b/src/blackmisc/statusmessagelist.cpp index 7eb765647..fcf5fa519 100644 --- a/src/blackmisc/statusmessagelist.cpp +++ b/src/blackmisc/statusmessagelist.cpp @@ -181,7 +181,7 @@ namespace BlackMisc rowHtml += "" + QString::number(line++) + ""; } - for (const CPropertyIndex index : usedIndexes) + for (const CPropertyIndex &index : usedIndexes) { rowHtml += "" + statusMessage.propertyByIndex(index).toQString(true) + ""; }