mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-12-03 15:22:34 -08:00
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:
40 files changed
+90
-90
No files matched your search
@@ -34,12 +34,12 @@ EntrySearcher::searchEntries(const QString& searchTerm, const Group* group, Qt::
|
||||
{
|
||||
QList<Entry*> searchResult;
|
||||
|
||||
const QList<Entry*> entryList = group->entries();
|
||||
const QList<Entry*>& entryList = group->entries();
|
||||
for (Entry* entry : entryList) {
|
||||
searchResult.append(matchEntry(searchTerm, entry, caseSensitivity));
|
||||
}
|
||||
|
||||
const QList<Group*> children = group->children();
|
||||
const QList<Group*>& children = group->children();
|
||||
for (Group* childGroup : children) {
|
||||
if (childGroup->searchingEnabled() != Group::Disable) {
|
||||
if (matchGroup(searchTerm, childGroup, caseSensitivity)) {
|
||||
|
||||
Reference in new issue
Block a user