From f73d9116288a6a16aaead431813d36e924bbd8b5 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 1 Sep 2021 21:46:25 +0200 Subject: Style --- src/libstore/local-store.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/libstore') 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) -- cgit v1.2.3