From ff762fb499be220ccd680f3bf68dca44a902a5ff Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 3 Dec 2008 16:10:17 +0000 Subject: * Pass HashType values instead of strings. --- src/nix-store/nix-store.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/nix-store') 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); } -- cgit 1.4.1