mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 551736: Add parens around right-shift, to fix compile warning and make sure we construct hash value correctly. r=sicking
This commit is contained in:
parent
3775fecc82
commit
fcceb020d5
@ -50,9 +50,12 @@ nsSMILCompositor::KeyEquals(KeyTypePointer aKey) const
|
||||
/*static*/ PLDHashNumber
|
||||
nsSMILCompositor::HashKey(KeyTypePointer aKey)
|
||||
{
|
||||
// Combine the 3 values into one numeric value, which will be hashed
|
||||
return NS_PTR_TO_UINT32(aKey->mElement.get()) >> 4 +
|
||||
NS_PTR_TO_INT32(aKey->mAttributeName.get()) +
|
||||
// Combine the 3 values into one numeric value, which will be hashed.
|
||||
// NOTE: We right-shift one of the pointers by 2 to get some randomness in
|
||||
// its 2 lowest-order bits. (Those shifted-off bits will always be 0 since
|
||||
// our pointers will be word-aligned.)
|
||||
return (NS_PTR_TO_UINT32(aKey->mElement.get()) >> 2) +
|
||||
NS_PTR_TO_UINT32(aKey->mAttributeName.get()) +
|
||||
(aKey->mIsCSS ? 1 : 0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user