From d8ea4f9b06ec279d30ef7206bda51e9257a06372 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Mon, 9 Sep 2013 09:23:23 -0700 Subject: [PATCH] Make UnsignedInteger HashFunction a unary function object --- modules/beast_crypto/math/beast_UnsignedInteger.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/beast_crypto/math/beast_UnsignedInteger.h b/modules/beast_crypto/math/beast_UnsignedInteger.h index 4413511b96..2a891cba5d 100644 --- a/modules/beast_crypto/math/beast_UnsignedInteger.h +++ b/modules/beast_crypto/math/beast_UnsignedInteger.h @@ -67,6 +67,13 @@ public: return hash; } + HashValue operator() (UnsignedInteger const& key) const noexcept + { + HashValue hash; + Murmur::Hash (key.cbegin (), key.sizeInBytes, m_seed, &hash); + return hash; + } + private: HashValue m_seed; };