Commit e601c7d8 authored by Moritz Hanke's avatar Moritz Hanke Committed by Mathis Rosenhauer

replaces subtraction with XOR in FLUSH

parent 9af97721
......@@ -105,10 +105,11 @@
data = d; \
} \
} else { \
if (half_d <= xmax - data) { \
/*in this case (xmax - data == xmax ^ data)*/ \
if (half_d <= (xmax ^ data)) { \
data += (d >> 1)^(~((d & 1) - 1)); \
} else { \
data = xmax - d; \
data = xmax ^ d; \
} \
} \
put_##KIND(strm, (uint32_t)data); \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment