diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2019-10-09 15:51:52 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2019-10-09 16:06:29 +0200 |
commit | 99b73fb5071db9fd757c9927fc3fde34e2abac63 (patch) | |
tree | fb50f681aced9f566da52aaf22eb4275471d010a /src/libstore/local-store.cc | |
parent | e6e61f0a54dac0174df996e93fcfedcac7769ab4 (diff) |
OCD performance fix: {find,count}+insert => insert
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r-- | src/libstore/local-store.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index a2af51d0e..859094e61 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -1292,8 +1292,7 @@ void LocalStore::verifyPath(const Path & path, const PathSet & store, { checkInterrupt(); - if (done.find(path) != done.end()) return; - done.insert(path); + if (!done.insert(path).second) return; if (!isStorePath(path)) { printError(format("path '%1%' is not in the Nix store") % path); |