Title: [128657] trunk/Source/WTF
Revision
128657
Author
[email protected]
Date
2012-09-14 14:57:26 -0700 (Fri, 14 Sep 2012)

Log Message

        Minimize collisions when hashing pairs
        https://bugs.webkit.org/show_bug.cgi?id=96022

        Build fix (with newer clang?)

        * wtf/HashFunctions.h: (WTF::pairIntHash): Be explicit about casting from
        64 bit to 32 bit.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (128656 => 128657)


--- trunk/Source/WTF/ChangeLog	2012-09-14 21:52:22 UTC (rev 128656)
+++ trunk/Source/WTF/ChangeLog	2012-09-14 21:57:26 UTC (rev 128657)
@@ -1,3 +1,13 @@
+2012-09-14  Alexey Proskuryakov  <[email protected]>
+
+        Minimize collisions when hashing pairs
+        https://bugs.webkit.org/show_bug.cgi?id=96022
+
+        Build fix (with newer clang?)
+
+        * wtf/HashFunctions.h: (WTF::pairIntHash): Be explicit about casting from
+        64 bit to 32 bit.
+
 2012-09-14  Dana Jansens  <[email protected]>
 
         Minimize collisions when hashing pairs

Modified: trunk/Source/WTF/wtf/HashFunctions.h (128656 => 128657)


--- trunk/Source/WTF/wtf/HashFunctions.h	2012-09-14 21:52:22 UTC (rev 128656)
+++ trunk/Source/WTF/wtf/HashFunctions.h	2012-09-14 21:57:26 UTC (rev 128657)
@@ -94,7 +94,7 @@
         uint64_t longRandom = 19248658165952622LL; // A random 64-bit value.
 
         uint64_t product = longRandom * (shortRandom1 * key1 + shortRandom2 * key2);
-        unsigned highBits = product >> (sizeof(uint64_t) - sizeof(unsigned));
+        unsigned highBits = static_cast<unsigned>(product >> (sizeof(uint64_t) - sizeof(unsigned)));
         return highBits;
     }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to