diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2008-12-03 16:10:17 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2008-12-03 16:10:17 +0000 |
commit | ff762fb499be220ccd680f3bf68dca44a902a5ff (patch) | |
tree | 02f738ec60517e3eadd5b0a2bc2fe5c19c3d954c /src/nix-store | |
parent | 1307b222239da8e503d22ad9316789e30b4e2431 (diff) |
* Pass HashType values instead of strings.
Diffstat (limited to 'src/nix-store')
-rw-r--r-- | src/nix-store/nix-store.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc index e03e82221..065d7d4c0 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); } |