Changeset 52047 in webkit for trunk/JavaScriptCore/wtf/StdLibExtras.h
- Timestamp:
- Dec 11, 2009, 11:20:27 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/StdLibExtras.h
r52041 r52047 70 70 } 71 71 72 // Returns a count of the number of bits set in 'bits'.73 inline size_t bitCount(unsigned bits)74 {75 bits = bits - ((bits >> 1) & 0x55555555);76 bits = (bits & 0x33333333) + ((bits >> 2) & 0x33333333);77 return ((bits + (bits >> 4) & 0xF0F0F0F) * 0x1010101) >> 24;78 }79 80 72 } // namespace WTF 81 73
Note:
See TracChangeset
for help on using the changeset viewer.