Reduce number of unneeded copies

This patch aims at reducing the number of copies for obejcts that could
be referenced rather than copied, because they're not modified during
the computation.
This commit is contained in:
Gianluca Recchia 2018-10-28 12:49:32 +01:00
parent a67a574b89
commit da9afd3f6f
No known key found for this signature in database
GPG key ID: 3C2B4128D9A1F218
40 changed files with 90 additions and 90 deletions

View file

@ -64,7 +64,7 @@ bool CsvExporter::writeGroup(QIODevice* device, const Group* group, QString grou
}
groupPath.append(group->name());
const QList<Entry*> entryList = group->entries();
const QList<Entry*>& entryList = group->entries();
for (const Entry* entry : entryList) {
QString line;
@ -83,7 +83,7 @@ bool CsvExporter::writeGroup(QIODevice* device, const Group* group, QString grou
}
}
const QList<Group*> children = group->children();
const QList<Group*>& children = group->children();
for (const Group* child : children) {
if (!writeGroup(device, child, groupPath)) {
return false;