aboutsummaryrefslogtreecommitdiff
path: root/src/nix-prefetch-url
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-03-28 23:22:10 +0000
committerJohn Ericson <git@JohnEricson.me>2020-03-29 11:23:15 -0400
commit87b32bab05ff91981c8847d66cd5502feb44f3b5 (patch)
treeff77f6703185a8b9544f354de5853254ef88a4d8 /src/nix-prefetch-url
parenteb1911e277bfcc1b161cb996205ae1696f496099 (diff)
Use `enum struct` and drop prefixes
This does a few enums; the rest will be gotten in subsequent commits.
Diffstat (limited to 'src/nix-prefetch-url')
-rw-r--r--src/nix-prefetch-url/nix-prefetch-url.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nix-prefetch-url/nix-prefetch-url.cc b/src/nix-prefetch-url/nix-prefetch-url.cc
index 18ced94b1..750ac2327 100644
--- a/src/nix-prefetch-url/nix-prefetch-url.cc
+++ b/src/nix-prefetch-url/nix-prefetch-url.cc
@@ -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")