equal
deleted
inserted
replaced
430 * Counts the number of set bits in a variable. |
430 * Counts the number of set bits in a variable. |
431 * |
431 * |
432 * @param value the value to count the number of bits in. |
432 * @param value the value to count the number of bits in. |
433 * @return the number of bits. |
433 * @return the number of bits. |
434 */ |
434 */ |
435 template<typename T> static inline uint COUNTBITS(T value) |
435 template<typename T> static inline uint CountBits(T value) |
436 { |
436 { |
437 register uint num; |
437 register uint num; |
438 |
438 |
439 /* This loop is only called once for every bit set by clearing the lowest |
439 /* This loop is only called once for every bit set by clearing the lowest |
440 * bit in each loop. The number of bits is therefore equal to the number of |
440 * bit in each loop. The number of bits is therefore equal to the number of |