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