diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-09-01 21:46:25 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2021-09-01 21:46:25 +0200 |
commit | f73d9116288a6a16aaead431813d36e924bbd8b5 (patch) | |
tree | e123619e3f91dd37a544dbb9daeb43a7865539f2 /src/libstore/local-store.cc | |
parent | 2cb7a502a4f2882b46bd1cfa8296d5ee99553a9f (diff) |
Style
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r-- | src/libstore/local-store.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index faabe4170..2890df479 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -1071,18 +1071,19 @@ StorePathSet LocalStore::querySubstitutablePaths(const StorePathSet & paths) } +// FIXME: move this, it's not specific to LocalStore. void LocalStore::querySubstitutablePathInfos(const StorePathCAMap & paths, SubstitutablePathInfos & infos) { if (!settings.useSubstitutes) return; for (auto & sub : getDefaultSubstituters()) { for (auto & path : paths) { - if (infos.find(path.first) != infos.end()) - // choose first succeeding substituter + if (infos.count(path.first)) + // Choose first succeeding substituter. continue; auto subPath(path.first); - // recompute store path so that we can use a different store root + // Recompute store path so that we can use a different store root. if (path.second) { subPath = makeFixedOutputPathFromCA(path.first.name(), *path.second); if (sub->storeDir == storeDir) |