aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/hash.hh
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-08-14 17:00:13 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-08-14 17:00:13 +0000
commit3c8b5b62192b828c392e9122536d666e23278d8e (patch)
tree6302c4599c947dee9044e74f5f116aa927713c8f /src/libutil/hash.hh
parent5f80aea795d3f6f78d682c7b99453b6fb7c9b6ba (diff)
parent13e49be6602314fe5e5d7beb8a807d5d892e864e (diff)
Merge remote-tracking branch 'upstream/master' into single-ca-drv-build
Diffstat (limited to 'src/libutil/hash.hh')
-rw-r--r--src/libutil/hash.hh5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libutil/hash.hh b/src/libutil/hash.hh
index 00ce7bb6f..6d6eb70ca 100644
--- a/src/libutil/hash.hh
+++ b/src/libutil/hash.hh
@@ -59,9 +59,6 @@ private:
Hash(std::string_view s, HashType type, bool isSRI);
public:
- /* Check whether a hash is set. */
- operator bool () const { return (bool) type; }
-
/* Check whether two hash are equal. */
bool operator == (const Hash & h2) const;
@@ -105,6 +102,8 @@ public:
assert(type == htSHA1);
return std::string(to_string(Base16, false), 0, 7);
}
+
+ static Hash dummy;
};
/* Helper that defaults empty hashes to the 0 hash. */