Changeset 53454 in webkit for trunk/JavaScriptCore/wtf/StringHashFunctions.h
- Timestamp:
- Jan 18, 2010, 9:51:40 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/StringHashFunctions.h
r53400 r53454 61 61 hash ^= hash << 10; 62 62 63 hash &= 0x7fffffff;64 65 63 // this avoids ever returning a hash code of 0, since that is used to 66 64 // signal "hash not computed yet", using a value that is likely to be 67 65 // effectively the same as 0 when the low bits are masked 68 66 if (hash == 0) 69 hash = 0x 40000000;67 hash = 0x80000000; 70 68 71 69 return hash; … … 101 99 hash ^= hash << 10; 102 100 103 hash &= 0x7fffffff;104 105 101 // this avoids ever returning a hash code of 0, since that is used to 106 102 // signal "hash not computed yet", using a value that is likely to be 107 103 // effectively the same as 0 when the low bits are masked 108 104 if (hash == 0) 109 hash = 0x 40000000;105 hash = 0x80000000; 110 106 111 107 return hash; … … 142 138 hash ^= hash << 10; 143 139 144 hash &= 0x7fffffff;145 146 140 // This avoids ever returning a hash code of 0, since that is used to 147 141 // signal "hash not computed yet", using a value that is likely to be 148 142 // effectively the same as 0 when the low bits are masked. 149 143 if (hash == 0) 150 hash = 0x 40000000;144 hash = 0x80000000; 151 145 152 146 return hash;
Note:
See TracChangeset
for help on using the changeset viewer.