Changeset 128657 in webkit


Ignore:
Timestamp:
Sep 14, 2012 2:57:26 PM (12 years ago)
Author:
ap@apple.com
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.
Location:
trunk/Source/WTF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r128650 r128657  
     12012-09-14  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Minimize collisions when hashing pairs
     4        https://bugs.webkit.org/show_bug.cgi?id=96022
     5
     6        Build fix (with newer clang?)
     7
     8        * wtf/HashFunctions.h: (WTF::pairIntHash): Be explicit about casting from
     9        64 bit to 32 bit.
     10
    1112012-09-14  Dana Jansens  <danakj@chromium.org>
    212
  • trunk/Source/WTF/wtf/HashFunctions.h

    r128650 r128657  
    9595
    9696        uint64_t product = longRandom * (shortRandom1 * key1 + shortRandom2 * key2);
    97         unsigned highBits = product >> (sizeof(uint64_t) - sizeof(unsigned));
     97        unsigned highBits = static_cast<unsigned>(product >> (sizeof(uint64_t) - sizeof(unsigned)));
    9898        return highBits;
    9999    }
Note: See TracChangeset for help on using the changeset viewer.