Boost logo

Boost-Commit :

From: daniel_james_at_[hidden]
Date: 2008-03-24 12:29:39


Author: danieljames
Date: 2008-03-24 12:29:38 EDT (Mon, 24 Mar 2008)
New Revision: 43835
URL: http://svn.boost.org/trac/boost/changeset/43835

Log:
Fix the FNV hash function.
Text files modified:
   branches/unordered/trunk/libs/unordered/examples/hash_functions/fnv-1.hpp | 4 ++--
   1 files changed, 2 insertions(+), 2 deletions(-)

Modified: branches/unordered/trunk/libs/unordered/examples/hash_functions/fnv-1.hpp
==============================================================================
--- branches/unordered/trunk/libs/unordered/examples/hash_functions/fnv-1.hpp (original)
+++ branches/unordered/trunk/libs/unordered/examples/hash_functions/fnv-1.hpp 2008-03-24 12:29:38 EDT (Mon, 24 Mar 2008)
@@ -7,7 +7,7 @@
     template <std::size_t FnvPrime, std::size_t OffsetBias>
     struct basic_fnv_1
     {
- std::size_t operator()(std::string const& text)
+ std::size_t operator()(std::string const& text) const
         {
             std::size_t hash = OffsetBias;
             for(std::string::const_iterator it = text.begin(), end = text.end();
@@ -24,7 +24,7 @@
     template <std::size_t FnvPrime, std::size_t OffsetBias>
     struct basic_fnv_1a
     {
- std::size_t operator()(std::string const& text)
+ std::size_t operator()(std::string const& text) const
         {
             std::size_t hash = OffsetBias;
             for(std::string::const_iterator it = text.begin(), end = text.end();


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk