From e74a63076b7c21bd45f5156fc028d41db8aa5eb0 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 28 Sep 2022 16:01:58 -0700 Subject: [GUFA] Improve hashing (#5091) Avoid manually doing bitshifts etc. - leave combining to the core hash logic, which can do a better job. --- src/support/hash.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/support') 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 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 -- cgit v1.2.3