about summary refs log tree commit diff
path: root/third_party/nix/src/libstore/local-binary-cache-store.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libstore/local-binary-cache-store.cc')
-rw-r--r--third_party/nix/src/libstore/local-binary-cache-store.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/third_party/nix/src/libstore/local-binary-cache-store.cc b/third_party/nix/src/libstore/local-binary-cache-store.cc
index 29c74cedd8..58ce7c0911 100644
--- a/third_party/nix/src/libstore/local-binary-cache-store.cc
+++ b/third_party/nix/src/libstore/local-binary-cache-store.cc
@@ -1,3 +1,5 @@
+#include <utility>
+
 #include "binary-cache-store.hh"
 #include "globals.hh"
 #include "nar-info-disk-cache.hh"
@@ -9,8 +11,8 @@ class LocalBinaryCacheStore : public BinaryCacheStore {
   Path binaryCacheDir;
 
  public:
-  LocalBinaryCacheStore(const Params& params, const Path& binaryCacheDir)
-      : BinaryCacheStore(params), binaryCacheDir(binaryCacheDir) {}
+  LocalBinaryCacheStore(const Params& params, Path binaryCacheDir)
+      : BinaryCacheStore(params), binaryCacheDir(std::move(binaryCacheDir)) {}
 
   void init() override;
 
@@ -78,7 +80,7 @@ static RegisterStoreImplementation regStore(
        const Store::Params& params) -> std::shared_ptr<Store> {
       if (getEnv("_NIX_FORCE_HTTP_BINARY_CACHE_STORE") == "1" ||
           std::string(uri, 0, 7) != "file://") {
-        return 0;
+        return nullptr;
       }
       auto store =
           std::make_shared<LocalBinaryCacheStore>(params, std::string(uri, 7));