mirror of
https://github.com/NixOS/nix
synced 2025-07-04 23:51:47 +02:00
Remove std::string alias (for real this time)
Also use std::string_view in a few more places.
This commit is contained in:
parent
14b38d0887
commit
df552ff53e
110 changed files with 773 additions and 681 deletions
|
@ -20,7 +20,7 @@ const int sha512HashSize = 64;
|
|||
|
||||
extern std::set<std::string> hashTypes;
|
||||
|
||||
extern const string base32Chars;
|
||||
extern const std::string base32Chars;
|
||||
|
||||
enum Base : int { Base64, Base32, Base16, SRI };
|
||||
|
||||
|
@ -110,7 +110,7 @@ public:
|
|||
Hash newHashAllowEmpty(std::string_view hashStr, std::optional<HashType> ht);
|
||||
|
||||
/* Print a hash in base-16 if it's MD5, or base-32 otherwise. */
|
||||
string printHash16or32(const Hash & hash);
|
||||
std::string printHash16or32(const Hash & hash);
|
||||
|
||||
/* Compute the hash of the given string. */
|
||||
Hash hashString(HashType ht, std::string_view s);
|
||||
|
@ -135,7 +135,7 @@ HashType parseHashType(std::string_view s);
|
|||
std::optional<HashType> parseHashTypeOpt(std::string_view s);
|
||||
|
||||
/* And the reverse. */
|
||||
string printHashType(HashType ht);
|
||||
std::string printHashType(HashType ht);
|
||||
|
||||
|
||||
union Ctx;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue