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:
parent
6dace308de
commit
3f984eefb1
2 changed files with 6 additions and 1 deletions
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue