22 #ifndef __MYGUI_BITWISE_H__
23 #define __MYGUI_BITWISE_H__
35 template<
typename Type>
39 _value |= _value >> 16;
40 _value |= _value >> 8;
41 _value |= _value >> 4;
42 _value |= _value >> 2;
43 _value |= _value >> 1;
49 template<
typename Type>
52 return (_value & (_value - 1)) == 0;
58 template<
typename Type>
65 while ((_mask & 1) == 0)
76 #endif // __MYGUI_BITWISE_H__
static __inline size_t getBitShift(Type _mask)
static __inline Type firstPO2From(Type _value)
static __inline bool isPO2(Type _value)