about summary refs log tree commit diff
path: root/third_party/nix/src/libstore/http-binary-cache-store.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libstore/http-binary-cache-store.cc')
-rw-r--r--third_party/nix/src/libstore/http-binary-cache-store.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/third_party/nix/src/libstore/http-binary-cache-store.cc b/third_party/nix/src/libstore/http-binary-cache-store.cc
index d3b551f08c..1a46423b35 100644
--- a/third_party/nix/src/libstore/http-binary-cache-store.cc
+++ b/third_party/nix/src/libstore/http-binary-cache-store.cc
@@ -1,3 +1,5 @@
+#include <utility>
+
 #include <glog/logging.h>
 
 #include "binary-cache-store.hh"
@@ -21,8 +23,8 @@ class HttpBinaryCacheStore : public BinaryCacheStore {
   Sync<State> _state;
 
  public:
-  HttpBinaryCacheStore(const Params& params, const Path& _cacheUri)
-      : BinaryCacheStore(params), cacheUri(_cacheUri) {
+  HttpBinaryCacheStore(const Params& params, Path _cacheUri)
+      : BinaryCacheStore(params), cacheUri(std::move(_cacheUri)) {
     if (cacheUri.back() == '/') {
       cacheUri.pop_back();
     }
@@ -157,7 +159,7 @@ static RegisterStoreImplementation regStore(
           std::string(uri, 0, 8) != "https://" &&
           (getEnv("_NIX_FORCE_HTTP_BINARY_CACHE_STORE") != "1" ||
            std::string(uri, 0, 7) != "file://")) {
-        return 0;
+        return nullptr;
       }
       auto store = std::make_shared<HttpBinaryCacheStore>(params, uri);
       store->init();