@@ -63,15 +63,14 @@ template<typename T, typename U> static
* @param n The size/window for the addition
* @param i The value to add at the given startposition in the given window.
* @return The new value of x
*/
template<typename T, typename U> static inline T AB(T& x, const uint8 s, const uint8 n, const U i)
{
const T tmp = (T)(((1U << n) - 1) << s);
x &= ~tmp;
x |= (T)((x + (i << s)) & tmp);
const T mask = (T)(((1U << n) - 1) << s);
x = (T)((x & ~mask) | ((x + (i << s)) & mask));
return x;
}
#ifdef min
#undef min
#endif