1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 06:31:14 +02:00

Use enum struct and drop prefixes

This does a few enums; the rest will be gotten in subsequent commits.
This commit is contained in:
John Ericson 2020-03-28 23:22:10 +00:00 committed by John Ericson
parent eb1911e277
commit 87b32bab05
57 changed files with 382 additions and 354 deletions

View file

@ -51,7 +51,7 @@ string resolveMirrorUri(EvalState & state, string uri)
static int _main(int argc, char * * argv)
{
{
HashType ht = htSHA256;
HashType ht = HashType::SHA256;
std::vector<string> args;
bool printPath = getEnv("PRINT_PATH") == "1";
bool fromExpr = false;
@ -72,7 +72,7 @@ static int _main(int argc, char * * argv)
else if (*arg == "--type") {
string s = getArg(*arg, arg, end);
ht = parseHashType(s);
if (ht == htUnknown)
if (ht == HashType::Unknown)
throw UsageError(format("unknown hash type '%1%'") % s);
}
else if (*arg == "--print-path")