diff options
author | Alon Zakai <azakai@google.com> | 2022-09-28 16:01:58 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-28 23:01:58 +0000 |
commit | e74a63076b7c21bd45f5156fc028d41db8aa5eb0 (patch) | |
tree | b54ce00a756c2483226ce4429866a9c13d218976 /src/support | |
parent | e8915d2a0f8ab592d5da2d572c971a65b753c87c (diff) | |
download | binaryen-e74a63076b7c21bd45f5156fc028d41db8aa5eb0.tar.gz binaryen-e74a63076b7c21bd45f5156fc028d41db8aa5eb0.tar.bz2 binaryen-e74a63076b7c21bd45f5156fc028d41db8aa5eb0.zip |
[GUFA] Improve hashing (#5091)
Avoid manually doing bitshifts etc. - leave combining to the core hash
logic, which can do a better job.
Diffstat (limited to 'src/support')
-rw-r--r-- | src/support/hash.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/support/hash.h b/src/support/hash.h index d3a858698..fb0e710a5 100644 --- a/src/support/hash.h +++ b/src/support/hash.h @@ -29,7 +29,7 @@ template<typename T> inline std::size_t hash(const T& value) { // Combines two digests into the first digest. Use instead of `rehash` if // `otherDigest` is another digest and not a `size_t` value. -static inline void hash_combine(std::size_t& digest, std::size_t otherDigest) { +inline void hash_combine(std::size_t& digest, const std::size_t otherDigest) { // see: boost/container_hash/hash.hpp // The constant is the N-bits reciprocal of the golden ratio: // phi = (1 + sqrt(5)) / 2 |