[Bf-blender-cvs] [d4ed5c3] master: A "better" (?) fix for msvc silliness - used in one other place in all of Blender
Joshua Leung
noreply at git.blender.org
Sun May 8 15:46:27 CEST 2016
Commit: d4ed5c398e689c46b8dc90134ad0ebabfcb79272
Author: Joshua Leung
Date: Mon May 9 01:46:18 2016 +1200
Branches: master
https://developer.blender.org/rBd4ed5c398e689c46b8dc90134ad0ebabfcb79272
A "better" (?) fix for msvc silliness - used in one other place in all of Blender
===================================================================
M extern/curve_fit_nd/intern/curve_fit_cubic.c
===================================================================
diff --git a/extern/curve_fit_nd/intern/curve_fit_cubic.c b/extern/curve_fit_nd/intern/curve_fit_cubic.c
index 8261950..b977634 100644
--- a/extern/curve_fit_nd/intern/curve_fit_cubic.c
+++ b/extern/curve_fit_nd/intern/curve_fit_cubic.c
@@ -29,6 +29,10 @@
* \ingroup curve_fit
*/
+#ifdef _MSC_VER
+# define _USE_MATH_DEFINES
+#endif
+
#include <math.h>
#include <float.h>
#include <stdbool.h>
@@ -39,12 +43,6 @@
#include "../curve_fit_nd.h"
-/* Fix for compiling on MSVC */
-#ifndef M_PI
-#define M_PI 3.14159265358979323846 /* pi */
-#endif
-
-
/* Take curvature into account when calculating the least square solution isn't usable. */
#define USE_CIRCULAR_FALLBACK
More information about the Bf-blender-cvs
mailing list