This is per our discussion - since we're only dealing with unsigned integers here (and no casts to signed), abs() is a noop.
Gerald --- dlls/d3d8/tests/visual.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c index e8e6bf870e..0b2ce20787 100644 --- a/dlls/d3d8/tests/visual.c +++ b/dlls/d3d8/tests/visual.c @@ -52,13 +52,13 @@ static HWND create_window(void)
static BOOL color_match(D3DCOLOR c1, D3DCOLOR c2, BYTE max_diff) { - if (abs((c1 & 0xff) - (c2 & 0xff)) > max_diff) return FALSE; + if ((c1 & 0xff) - (c2 & 0xff) > max_diff) return FALSE; c1 >>= 8; c2 >>= 8; - if (abs((c1 & 0xff) - (c2 & 0xff)) > max_diff) return FALSE; + if ((c1 & 0xff) - (c2 & 0xff) > max_diff) return FALSE; c1 >>= 8; c2 >>= 8; - if (abs((c1 & 0xff) - (c2 & 0xff)) > max_diff) return FALSE; + if ((c1 & 0xff) - (c2 & 0xff) > max_diff) return FALSE; c1 >>= 8; c2 >>= 8; - if (abs((c1 & 0xff) - (c2 & 0xff)) > max_diff) return FALSE; + if ((c1 & 0xff) - (c2 & 0xff) > max_diff) return FALSE; return TRUE; }