Skip to content

Commit

Permalink
lmdbbackend: Prevent a useless copy in LMDBBackend::getAllDomainsFilt…
Browse files Browse the repository at this point in the history
…ered()

Reported by Coverity as 1510936: AUTO_CAUSES_COPY.
  • Loading branch information
rgacogne committed Aug 1, 2023
1 parent 722b0d9 commit 5b06f29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/lmdbbackend/lmdbbackend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1722,9 +1722,9 @@ void LMDBBackend::getAllDomainsFiltered(vector<DomainInfo>* domains, const std::
zonemap[di.zone] = di;
}

for (auto [k, v] : zonemap) {
for (auto& [k, v] : zonemap) {
if (allow(v)) {
domains->push_back(v);
domains->push_back(std::move(v));
}
}
}
Expand Down

0 comments on commit 5b06f29

Please sign in to comment.