about summary refs log tree commit diff
path: root/src/nix-hash/nix-hash.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix-hash/nix-hash.cc')
-rw-r--r--src/nix-hash/nix-hash.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/nix-hash/nix-hash.cc b/src/nix-hash/nix-hash.cc
index dd2ed8d4f4..1282af070e 100644
--- a/src/nix-hash/nix-hash.cc
+++ b/src/nix-hash/nix-hash.cc
@@ -5,9 +5,12 @@
 #include "help.txt.hh"
 
 
+using namespace nix;
+
+
 void printHelp()
 {
-    cout << string((char *) helpText, sizeof helpText);
+    std::cout << string((char *) helpText, sizeof helpText);
 }
 
 
@@ -43,7 +46,7 @@ void run(Strings args)
         for (Strings::iterator i = ss.begin(); i != ss.end(); ++i) {
             Hash h = flat ? hashFile(ht, *i) : hashPath(ht, *i);
             if (truncate && h.hashSize > 20) h = compressHash(h, 20);
-            cout << format("%1%\n") %
+            std::cout << format("%1%\n") %
                 (base32 ? printHash32(h) : printHash(h));
         }
     }
@@ -51,7 +54,7 @@ void run(Strings args)
     else {
         for (Strings::iterator i = ss.begin(); i != ss.end(); ++i) {
             Hash h = op == opTo16 ? parseHash32(ht, *i) : parseHash(ht, *i);
-            cout << format("%1%\n") %
+            std::cout << format("%1%\n") %
                 (op == opTo16 ? printHash(h) : printHash32(h));
         }
     }