From c167f822265a3c121b317d602dc3c775482e1201 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Thu, 14 May 2015 10:00:37 +0000 Subject: [PATCH] [D3DX9_36/WINED3D] - Remove useless copysignf invocation and the wrong defines for it - BrokenHacksOnTopOfBrokenCode--; - Should be sent upstream svn path=/trunk/; revision=67709 --- reactos/dll/directx/wine/d3dx9_36/math.c | 6 +----- reactos/dll/directx/wine/wined3d/utils.c | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/reactos/dll/directx/wine/d3dx9_36/math.c b/reactos/dll/directx/wine/d3dx9_36/math.c index 2e1182116bd..2229cb4f849 100644 --- a/reactos/dll/directx/wine/d3dx9_36/math.c +++ b/reactos/dll/directx/wine/d3dx9_36/math.c @@ -24,10 +24,6 @@ #include "d3dx9_36_private.h" -#ifdef _MSC_VER -#define copysignf(x, y) ((x) < 0.0f ? -fabsf(y) : fabsf(y)) -#endif - struct ID3DXMatrixStackImpl { ID3DXMatrixStack ID3DXMatrixStack_iface; @@ -2122,7 +2118,7 @@ unsigned short float_32_to_16(const float in) { int exp = 0, origexp; float tmp = fabsf(in); - int sign = (copysignf(1, in) < 0); + int sign = (in < 0); unsigned int mantissa; unsigned short ret; diff --git a/reactos/dll/directx/wine/wined3d/utils.c b/reactos/dll/directx/wine/wined3d/utils.c index 2591e119032..e7b56ce5237 100644 --- a/reactos/dll/directx/wine/wined3d/utils.c +++ b/reactos/dll/directx/wine/wined3d/utils.c @@ -26,10 +26,6 @@ #include "wined3d_private.h" -#ifdef _MSC_VER -#define copysignf(x, y) ((x) < 0.0f ? -fabsf(y) : fabsf(y)) -#endif - WINE_DEFAULT_DEBUG_CHANNEL(d3d); struct wined3d_format_channels @@ -3991,7 +3987,7 @@ void wined3d_ftoa(float value, char *s) { int idx = 1; - if (copysignf(1.0f, value) < 0.0f) + if (value < 0.0f) ++idx; /* Be sure to allocate a buffer of at least 17 characters for the result