Use const ref to avoid copies

This commit is contained in:
Roland Winklmeier
2018-08-24 14:53:58 +02:00
parent 3267d1ec38
commit 93d30e844a
2 changed files with 2 additions and 2 deletions

View File

@@ -194,7 +194,7 @@ namespace BlackMisc
qint64 CArtifactList::getTotalFileSize() const
{
qint64 s = 0;
for (const CArtifact a : *this)
for (const CArtifact &a : *this)
{
s += a.getFileSize();
}

View File

@@ -166,7 +166,7 @@ namespace BlackMisc
int uc = 0;
int lc = 0;
for (const QChar ch : realName)
for (const QChar &ch : realName)
{
// Joe Doe -> valid
// jOE dOE -> invalid