src/macros.h
changeset 7929 6c9b25842b0f
parent 7928 63e18de69e50
child 7931 b0a46cd92225
equal deleted inserted replaced
7928:63e18de69e50 7929:6c9b25842b0f
   261  *
   261  *
   262  * @param x The variable to clear the bit
   262  * @param x The variable to clear the bit
   263  * @param y The bit position to clear
   263  * @param y The bit position to clear
   264  * @return The new value of the old value with the bit cleared
   264  * @return The new value of the old value with the bit cleared
   265  */
   265  */
   266 template<typename T> static inline T CLRBIT(T& x, const uint8 y)
   266 template<typename T> static inline T ClrBit(T& x, const uint8 y)
   267 {
   267 {
   268 	return x &= ~((T)1U << y);
   268 	return x = (T)(x & ~((T)1U << y));
   269 }
   269 }
   270 
   270 
   271 /**
   271 /**
   272  * Toggles a bit in a variable.
   272  * Toggles a bit in a variable.
   273  *
   273  *