about summary refs log tree commit diff
path: root/third_party/nix/src/libutil/hash.hh
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-24T21·29+0100
committerVincent Ambo <tazjin@google.com>2020-05-24T21·29+0100
commit838f86b0fd880b26539664140f04e5d16669dad8 (patch)
treec8fee2f0c136fbe5bb0735604e2f04d5b02698ba /third_party/nix/src/libutil/hash.hh
parentf30b2e610d9e612504a9f6460e0cc83413b80aeb (diff)
style(3p/nix): Remove 'using std::*' from types.hh r/840
It is considered bad form to use things from includes in headers, as
these directives propagate to everywhere else and can make it
confusing.

types.hh (which is includes almost literally everywhere) had some of
these directives, which this commit removes.
Diffstat (limited to 'third_party/nix/src/libutil/hash.hh')
-rw-r--r--third_party/nix/src/libutil/hash.hh10
1 files changed, 5 insertions, 5 deletions
diff --git a/third_party/nix/src/libutil/hash.hh b/third_party/nix/src/libutil/hash.hh
index a9002023fa31..f9c63c155ead 100644
--- a/third_party/nix/src/libutil/hash.hh
+++ b/third_party/nix/src/libutil/hash.hh
@@ -14,7 +14,7 @@ const int sha1HashSize = 20;
 const int sha256HashSize = 32;
 const int sha512HashSize = 64;
 
-extern const string base32Chars;
+extern const std::string base32Chars;
 
 enum Base : int { Base64, Base32, Base16, SRI };
 
@@ -68,10 +68,10 @@ struct Hash {
 };
 
 /* 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, const string& s);
+Hash hashString(HashType ht, const std::string& s);
 
 /* Compute the hash of the given file. */
 Hash hashFile(HashType ht, const Path& path);
@@ -87,10 +87,10 @@ HashResult hashPath(HashType ht, const Path& path,
 Hash compressHash(const Hash& hash, unsigned int newSize);
 
 /* Parse a string representing a hash type. */
-HashType parseHashType(const string& s);
+HashType parseHashType(const std::string& s);
 
 /* And the reverse. */
-string printHashType(HashType ht);
+std::string printHashType(HashType ht);
 
 union Ctx;