mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-30 22:29:13 +08:00
Use const ref to avoid copies
This commit is contained in:
@@ -194,7 +194,7 @@ namespace BlackMisc
|
|||||||
qint64 CArtifactList::getTotalFileSize() const
|
qint64 CArtifactList::getTotalFileSize() const
|
||||||
{
|
{
|
||||||
qint64 s = 0;
|
qint64 s = 0;
|
||||||
for (const CArtifact a : *this)
|
for (const CArtifact &a : *this)
|
||||||
{
|
{
|
||||||
s += a.getFileSize();
|
s += a.getFileSize();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ namespace BlackMisc
|
|||||||
|
|
||||||
int uc = 0;
|
int uc = 0;
|
||||||
int lc = 0;
|
int lc = 0;
|
||||||
for (const QChar ch : realName)
|
for (const QChar &ch : realName)
|
||||||
{
|
{
|
||||||
// Joe Doe -> valid
|
// Joe Doe -> valid
|
||||||
// jOE dOE -> invalid
|
// jOE dOE -> invalid
|
||||||
|
|||||||
Reference in New Issue
Block a user