aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/eval-cache.cc
diff options
context:
space:
mode:
authorCarlo Nucera <carlo.nucera@protonmail.com>2020-07-31 13:12:51 -0400
committerCarlo Nucera <carlo.nucera@protonmail.com>2020-07-31 13:12:51 -0400
commitb6d97fdbf4f668d72e93e94e956a19ddb299bcd2 (patch)
tree56cfa7cf92b3684d24f7f0c3ed7c4637e54b499f /src/libexpr/eval-cache.cc
parent2c7557481b4c9d5113a65cc7a75c8acc18031f4e (diff)
parenta3f9625818ecb0c8a3c22c191340dac5a3120bb5 (diff)
Merge branch 'master' of github.com:NixOS/nix into drv-outputs-map-allow-missing
Diffstat (limited to 'src/libexpr/eval-cache.cc')
-rw-r--r--src/libexpr/eval-cache.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libexpr/eval-cache.cc b/src/libexpr/eval-cache.cc
index 919de8a4e..deb32484f 100644
--- a/src/libexpr/eval-cache.cc
+++ b/src/libexpr/eval-cache.cc
@@ -285,11 +285,10 @@ static std::shared_ptr<AttrDb> makeAttrDb(const Hash & fingerprint)
}
EvalCache::EvalCache(
- bool useCache,
- const Hash & fingerprint,
+ std::optional<std::reference_wrapper<const Hash>> useCache,
EvalState & state,
RootLoader rootLoader)
- : db(useCache ? makeAttrDb(fingerprint) : nullptr)
+ : db(useCache ? makeAttrDb(*useCache) : nullptr)
, state(state)
, rootLoader(rootLoader)
{