mirror of
https://github.com/NixOS/nix
synced 2025-06-28 17:51:15 +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:
parent
eb1911e277
commit
87b32bab05
57 changed files with 382 additions and 354 deletions
|
@ -164,7 +164,7 @@ Args::FlagMaker & Args::FlagMaker::mkHashTypeFlag(HashType * ht)
|
|||
description("hash algorithm ('md5', 'sha1', 'sha256', or 'sha512')");
|
||||
handler([ht](std::string s) {
|
||||
*ht = parseHashType(s);
|
||||
if (*ht == htUnknown)
|
||||
if (*ht == HashType::Unknown)
|
||||
throw UsageError("unknown hash type '%1%'", s);
|
||||
});
|
||||
return *this;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue