]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - libs/splines/math_vector.h
Centralise compile checks
[xonotic/netradiant.git] / libs / splines / math_vector.h
index dde072578cc470a2b805c13052205c3de0398f15..4fbe8d9dc5820f8071af22b13308e98aaad0288b 100644 (file)
@@ -22,7 +22,9 @@
 #ifndef __MATH_VECTOR_H__
 #define __MATH_VECTOR_H__
 
-#ifdef WIN32
+#include "globaldefs.h"
+
+#if GDEF_COMPILER_MSVC
 #pragma warning(disable : 4244)
 #endif
 
 float Q_fabs( float f );
 
 #ifndef ID_INLINE
-#ifdef _WIN32
-#define ID_INLINE __inline
-#else
-#define ID_INLINE inline
-#endif
+#define ID_INLINE GDEF_ATTRIBUTE_INLINE
 #endif
 
 // if this is defined, vec3 will take four elements, which may allow
@@ -98,7 +96,7 @@ static inline float idSqrt( float x ) {
        }
        B = x;
 
-#ifdef __GNUC__
+#if GDEF_COMPILER_GNU
        asm ( "frsqrte %0,%1" : "=f" ( y0 ) : "f" ( B ) );
 #else
        y0 = __frsqrte( B );