Changeset 35334 in webkit for trunk/JavaScriptCore/wtf/HashFunctions.h
- Timestamp:
- Jul 24, 2008, 11:40:38 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/HashFunctions.h
r32650 r35334 95 95 96 96 template<typename T> struct FloatHash { 97 static unsigned hash(T key) { return intHash(*reinterpret_cast<typename IntTypes<sizeof(T)>::UnsignedType*>(&key)); } 97 static unsigned hash(T key) 98 { 99 union { 100 T key; 101 typename IntTypes<sizeof(T)>::UnsignedType bits; 102 } u; 103 u.key = key; 104 return intHash(u.bits); 105 } 98 106 static bool equal(T a, T b) { return a == b; } 99 107 static const bool safeToCompareToEmptyOrDeleted = true;
Note:
See TracChangeset
for help on using the changeset viewer.