Boost logo

Boost-Commit :

From: daniel_james_at_[hidden]
Date: 2007-08-23 22:01:49


Author: danieljames
Date: 2007-08-23 22:01:47 EDT (Thu, 23 Aug 2007)
New Revision: 38883
URL: http://svn.boost.org/trac/boost/changeset/38883

Log:
Change a comparison in the float hashing code, which can cause a warning on
gcc. Although the warning doesn't currently turn up in this branch, it could
be caused quite easily. Originally reported in:

http://lists.boost.org/Archives/boost/2007/08/126084.php

Text files modified:
   trunk/boost/functional/detail/hash_float.hpp | 2 +-
   1 files changed, 1 insertions(+), 1 deletions(-)

Modified: trunk/boost/functional/detail/hash_float.hpp
==============================================================================
--- trunk/boost/functional/detail/hash_float.hpp (original)
+++ trunk/boost/functional/detail/hash_float.hpp 2007-08-23 22:01:47 EDT (Thu, 23 Aug 2007)
@@ -56,7 +56,7 @@
                         std::numeric_limits<int>::digits - 1)
                 / std::numeric_limits<int>::digits;
 
- for(std::size_t i = 0; i < length; ++i)
+ for(std::size_t i = 0; i != length; ++i)
             {
                 v = boost::hash_detail::call_ldexp(v, std::numeric_limits<int>::digits);
                 int const part = static_cast<int>(v);


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