hash_bytes.cc (_Hash_bytes): Replace "clength" with "len" for "unusual sizeof(size_t)" case.

* libsupc++/hash_bytes.cc (_Hash_bytes): Replace "clength" with
"len" for "unusual sizeof(size_t)" case.

From-SVN: r164714
This commit is contained in:
DJ Delorie 2010-09-28 22:00:09 -04:00 committed by DJ Delorie
parent 6dace308de
commit 3f984eefb1
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2010-09-28 DJ Delorie <dj@redhat.com>
* libsupc++/hash_bytes.cc (_Hash_bytes): Replace "clength" with
"len" for "unusual sizeof(size_t)" case.
2010-09-28 Matt Austern <austern@google.com>
* testsuite/20_util/hash/chi2_quality.cc: New.

View file

@ -172,7 +172,7 @@ namespace std
{
size_t hash = seed;
const char* cptr = reinterpret_cast<const char*>(ptr);
for (; clength; --clength)
for (; len; --len)
hash = (hash * 131) + *cptr++;
return hash;
}