about summary refs log tree commit diff
path: root/src/nix-store/nix-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2008-12-03T16·10+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2008-12-03T16·10+0000
commitff762fb499be220ccd680f3bf68dca44a902a5ff (patch)
tree02f738ec60517e3eadd5b0a2bc2fe5c19c3d954c /src/nix-store/nix-store.cc
parent1307b222239da8e503d22ad9316789e30b4e2431 (diff)
* Pass HashType values instead of strings.
Diffstat (limited to 'src/nix-store/nix-store.cc')
-rw-r--r--src/nix-store/nix-store.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc
index e03e82221285..065d7d4c014d 100644
--- a/src/nix-store/nix-store.cc
+++ b/src/nix-store/nix-store.cc
@@ -125,7 +125,7 @@ static void opAddFixed(Strings opFlags, Strings opArgs)
     if (opArgs.empty())
         throw UsageError("first argument must be hash algorithm");
     
-    string hashAlgo = opArgs.front();
+    HashType hashAlgo = parseHashType(opArgs.front());
     opArgs.pop_front();
 
     for (Strings::iterator i = opArgs.begin(); i != opArgs.end(); ++i)
@@ -155,13 +155,13 @@ static void opPrintFixedPath(Strings opFlags, Strings opArgs)
         throw UsageError(format("`--print-fixed-path' requires three arguments"));
     
     Strings::iterator i = opArgs.begin();
-    string hashAlgo = *i++;
+    HashType hashAlgo = parseHashType(*i++);
     string hash = *i++;
     string name = *i++;
 
     cout << format("%1%\n") %
         makeFixedOutputPath(recursive, hashAlgo,
-            parseHash16or32(parseHashType(hashAlgo), hash), name);
+            parseHash16or32(hashAlgo, hash), name);
 }