mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
Use const ref to avoid copies
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user