Changeset 17372 in webkit for trunk/JavaScriptCore/wtf/HashFunctions.h
- Timestamp:
- Oct 27, 2006, 9:48:28 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/HashFunctions.h
r17127 r17372 60 60 key += ~(key << 27); 61 61 key ^= (key >> 31); 62 return key;62 return static_cast<unsigned>(key); 63 63 } 64 64 … … 71 71 72 72 template<typename T> struct PtrHash { 73 static unsigned hash(T key) { return IntHash<uintptr_t>::hash(reinterpret_cast<uintptr_t>(key)); } 73 static unsigned hash(T key) 74 { 75 #if COMPILER(MSVC) 76 #pragma warning(push) 77 #pragma warning(disable: 4244) // work around what seems to be a bug in MSVC's conversion warnings 78 #endif 79 return IntHash<uintptr_t>::hash(reinterpret_cast<uintptr_t>(key)); 80 #if COMPILER(MSVC) 81 #pragma warning(pop) 82 #endif 83 } 74 84 static bool equal(T a, T b) { return a == b; } 75 85 };
Note:
See TracChangeset
for help on using the changeset viewer.