[Bf-blender-cvs] [2f42be6] master: Cleanup: remove MSVC2008 workaround
Campbell Barton
noreply at git.blender.org
Sat Apr 4 22:54:52 CEST 2015
Commit: 2f42be6995503ff1df7dd14941ecc43ab0cb49c5
Author: Campbell Barton
Date: Sun Apr 5 06:47:31 2015 +1000
Branches: master
https://developer.blender.org/rB2f42be6995503ff1df7dd14941ecc43ab0cb49c5
Cleanup: remove MSVC2008 workaround
===================================================================
M source/blender/blenlib/intern/math_base.c
===================================================================
diff --git a/source/blender/blenlib/intern/math_base.c b/source/blender/blenlib/intern/math_base.c
index 3ff1af3..cddfde3 100644
--- a/source/blender/blenlib/intern/math_base.c
+++ b/source/blender/blenlib/intern/math_base.c
@@ -31,42 +31,6 @@
#include "BLI_strict_flags.h"
-/* WARNING: MSVC compiling hack for double_round() */
-#if (defined(WIN32) || defined(WIN64)) && !(defined(FREE_WINDOWS))
-
-/* from python 3.1 pymath.c */
-double copysign(double x, double y)
-{
- /* use atan2 to distinguish -0.0 from 0.0 */
- if (y > 0.0 || (y == 0.0 && atan2(y, -1.0) > 0.0)) {
- return fabs(x);
- }
- else {
- return -fabs(x);
- }
-}
-
-/* from python 3.1 pymath.c */
-double round(double x)
-{
- double absx, y;
- absx = fabs(x);
- y = floor(absx);
- if (absx - y >= 0.5)
- y += 1.0;
- return copysign(y, x);
-}
-#else /* OpenSuse 11.1 seems to need this. */
-# ifdef __GNUC__
-# pragma GCC diagnostic push
-# pragma GCC diagnostic ignored "-Wredundant-decls"
-# endif
-double round(double x);
-# ifdef __GNUC__
-# pragma GCC diagnostic pop
-# endif
-#endif
-
/* from python 3.1 floatobject.c
* ndigits must be between 0 and 21 */
double double_round(double x, int ndigits)
More information about the Bf-blender-cvs
mailing list