mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-09 00:11:44 +00:00
Bug 95296. Use nsCRT::HashCode() instead of bad lossy slow hash routine. sr=brendan
This commit is contained in:
parent
6a13fe367b
commit
6eebace45b
@ -143,13 +143,7 @@ AtomImpl::SizeOf(nsISizeOfHandler* aHandler, PRUint32* _retval) /*FIX: const */
|
||||
|
||||
static PLHashNumber HashKey(const PRUnichar* k)
|
||||
{
|
||||
PRUint32 hashResult = 0;
|
||||
PRUint32 N = nsCRT::strlen(k);
|
||||
|
||||
for ( PRUint32 n=0; n<N; ++n )
|
||||
hashResult = (hashResult<<5) + (hashResult<<2) + hashResult + *k++; // mHash = mHash*37 + *s
|
||||
|
||||
return hashResult;
|
||||
return nsCRT::HashCode(k);
|
||||
}
|
||||
|
||||
static PRIntn CompareKeys( const PRUnichar* k1, const PRUnichar* k2 )
|
||||
|
Loading…
x
Reference in New Issue
Block a user