From 7909d8af20883308bc9cb34ec5a292f91139d2b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C3=ABl=20Carr=C3=A9?= Date: Thu, 26 Jul 2012 14:24:25 -0400 Subject: Guard _MSC_VER tests, remove FLOAT2INT16 when DISABLE_FLOAT_API. --- celt/float_cast.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'celt/float_cast.h') diff --git a/celt/float_cast.h b/celt/float_cast.h index 36a13fca..5ded2915 100644 --- a/celt/float_cast.h +++ b/celt/float_cast.h @@ -90,14 +90,14 @@ #include #define float2int(x) lrint(x) -#elif (_MSC_VER >= 1400) && (defined (WIN64) || defined (_WIN64)) +#elif (defined(_MSC_VER) && _MSC_VER >= 1400) && (defined (WIN64) || defined (_WIN64)) #include __inline long int float2int(float value) { return _mm_cvtss_si32(_mm_load_ss(&value)); } -#elif (_MSC_VER >= 1400) && (defined (WIN32) || defined (_WIN32)) +#elif (defined(_MSC_VER) && _MSC_VER >= 1400) && (defined (WIN32) || defined (_WIN32)) #include /* Win32 doesn't seem to have these functions. @@ -127,6 +127,7 @@ #define float2int(flt) ((int)(floor(.5+flt))) #endif +#ifndef DISABLE_FLOAT_API static inline opus_int16 FLOAT2INT16(float x) { x = x*CELT_SIG_SCALE; @@ -134,5 +135,6 @@ static inline opus_int16 FLOAT2INT16(float x) x = MIN32(x, 32767); return (opus_int16)float2int(x); } +#endif /* DISABLE_FLOAT_API */ #endif /* FLOAT_CAST_H */ -- cgit v1.2.3