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)