about summary refs log tree commit diff
path: root/third_party/nix/src/nix/hash.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/nix/hash.cc')
-rw-r--r--third_party/nix/src/nix/hash.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/third_party/nix/src/nix/hash.cc b/third_party/nix/src/nix/hash.cc
index da4b64fe75..74ff45d0d8 100644
--- a/third_party/nix/src/nix/hash.cc
+++ b/third_party/nix/src/nix/hash.cc
@@ -34,7 +34,7 @@ struct CmdHash : Command {
   }
 
   void run() override {
-    for (auto path : paths) {
+    for (const auto& path : paths) {
       Hash h = mode == mFile ? hashFile(ht, path) : hashPath(ht, path).first;
       if (truncate && h.hashSize > 20) {
         h = compressHash(h, 20);
@@ -73,7 +73,7 @@ struct CmdToBase : Command {
   }
 
   void run() override {
-    for (auto s : args) {
+    for (const auto& s : args) {
       std::cout << fmt("%s\n", Hash(s, ht).to_string(base, base == SRI));
     }
   }