refs #800 Fixed making unnecessary copies.

This commit is contained in:
Mathew Sutcliffe
2016-11-10 00:42:57 +00:00
committed by Klaus Basan
parent 6f972035ab
commit 429c6946c6
3 changed files with 3 additions and 3 deletions

View File

@@ -331,7 +331,7 @@ namespace BlackGui
QList<int> CGuiUtility::indexToUniqueRows(const QModelIndexList &indexes) QList<int> CGuiUtility::indexToUniqueRows(const QModelIndexList &indexes)
{ {
QList<int> rows; QList<int> rows;
for (const QModelIndex i : indexes) for (const QModelIndex &i : indexes)
{ {
const int r = i.row(); const int r = i.row();
if (rows.contains(r)) { continue; } if (rows.contains(r)) { continue; }

View File

@@ -26,7 +26,7 @@ namespace BlackMisc
for (const Obj &obj : container) for (const Obj &obj : container)
{ {
QString rowHtml; QString rowHtml;
for (const CPropertyIndex index : indexes) for (const CPropertyIndex &index : indexes)
{ {
rowHtml += "<td>" + obj.propertyByIndex(index).toQString(true) + "</td>"; rowHtml += "<td>" + obj.propertyByIndex(index).toQString(true) + "</td>";
} }

View File

@@ -181,7 +181,7 @@ namespace BlackMisc
rowHtml += "<td>" + QString::number(line++) + "</td>"; rowHtml += "<td>" + QString::number(line++) + "</td>";
} }
for (const CPropertyIndex index : usedIndexes) for (const CPropertyIndex &index : usedIndexes)
{ {
rowHtml += "<td>" + statusMessage.propertyByIndex(index).toQString(true) + "</td>"; rowHtml += "<td>" + statusMessage.propertyByIndex(index).toQString(true) + "</td>";
} }