From 87fc1a0019f4114d2147adc3cb612cb37172abc1 Mon Sep 17 00:00:00 2001 From: Drake Arconis <drake@alchemyviewer.org> Date: Sat, 25 Jul 2015 15:30:07 -0400 Subject: [PATCH] More windows cleanup --- indra/llcommon/linden_common.h | 2 -- indra/llmath/llmath.h | 32 ++------------------------------ 2 files changed, 2 insertions(+), 32 deletions(-) diff --git a/indra/llcommon/linden_common.h b/indra/llcommon/linden_common.h index 5cfcdab41c..3efebda632 100755 --- a/indra/llcommon/linden_common.h +++ b/indra/llcommon/linden_common.h @@ -33,11 +33,9 @@ // are not precompiled. #if defined(LL_WINDOWS) && defined(_DEBUG) -# if _MSC_VER >= 1400 // Visual C++ 2005 or later # define _CRTDBG_MAP_ALLOC # include <stdlib.h> # include <crtdbg.h> -# endif #endif #include "llpreprocessor.h" diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h index c236dae062..319ab954cc 100755 --- a/indra/llmath/llmath.h +++ b/indra/llmath/llmath.h @@ -43,11 +43,7 @@ // work around for Windows & older gcc non-standard function names. -#if (LL_WINDOWS && (_MSC_VER < 1900)) -#include <float.h> -#define llisnan(val) _isnan(val) -#define llfinite(val) _finite(val) -#elif (LL_LINUX && __GNUC__ <= 2) +#if (LL_LINUX && __GNUC__ <= 2) #define llisnan(val) isnan(val) #define llfinite(val) isfinite(val) #else @@ -153,36 +149,12 @@ inline F64 llabs(const F64 a) inline S32 lltrunc( F32 f ) { -#if LL_WINDOWS && !defined( __INTEL_COMPILER ) && !defined(_WIN64) && !(_MSC_VER >= 1800) - // Avoids changing the floating point control word. - // Add or subtract 0.5 - epsilon and then round - const static U32 zpfp[] = { 0xBEFFFFFF, 0x3EFFFFFF }; - S32 result; - __asm { - fld f - mov eax, f - shr eax, 29 - and eax, 4 - fadd dword ptr [zpfp + eax] - fistp result - } - return result; -#else -#ifdef LL_CPP11 - return (S32)trunc(f); -#else - return (S32)f; -#endif -#endif + return (S32)trunc(f); } inline S32 lltrunc( F64 f ) { -#ifdef LL_CPP11 return (S32)trunc(f); -#else - return (S32)f; -#endif } inline S32 llfloor( F32 f ) -- GitLab