7 #ifndef MYGUI_BITWISE_H_
8 #define MYGUI_BITWISE_H_
20 template<
typename Type>
24 _value |= _value >> 16;
25 _value |= _value >> 8;
26 _value |= _value >> 4;
27 _value |= _value >> 2;
28 _value |= _value >> 1;
34 template<
typename Type>
37 return (_value & (_value - 1)) == 0;
43 template<
typename Type>
50 while ((_mask & 1) == 0)
61 #endif // MYGUI_BITWISE_H_
static __inline size_t getBitShift(Type _mask)
static __inline Type firstPO2From(Type _value)
static __inline bool isPO2(Type _value)