From 5df427f35b77a87caf280a556b97a35d821499d3 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 20 Mar 2018 16:32:59 +0100 Subject: [PATCH] Slight simplification --- src/libstore/nar-info-disk-cache.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/libstore/nar-info-disk-cache.cc b/src/libstore/nar-info-disk-cache.cc index 6e155e877..3c52303f0 100644 --- a/src/libstore/nar-info-disk-cache.cc +++ b/src/libstore/nar-info-disk-cache.cc @@ -260,11 +260,8 @@ public: ref getNarInfoDiskCache() { - static Sync> cache; - - auto cache_(cache.lock()); - if (!*cache_) *cache_ = std::make_shared(); - return ref(*cache_); + static ref cache = make_ref(); + return cache; } }