[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26291] trunk/blender/source/blender: Use #include "BLI_math.h" instead of _USE_MATH_DEFINES to get M_PI defined .
Brecht Van Lommel
brecht at blender.org
Tue Jan 26 12:25:39 CET 2010
Revision: 26291
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26291
Author: blendix
Date: 2010-01-26 12:25:39 +0100 (Tue, 26 Jan 2010)
Log Message:
-----------
Use #include "BLI_math.h" instead of _USE_MATH_DEFINES to get M_PI defined.
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/depsgraph.c
trunk/blender/source/blender/blenkernel/intern/unit.c
trunk/blender/source/blender/blenlib/BLI_winstuff.h
trunk/blender/source/blender/editors/animation/anim_draw.c
trunk/blender/source/blender/editors/mesh/loopcut.c
trunk/blender/source/blender/makesrna/intern/rna_brush.c
trunk/blender/source/blender/makesrna/intern/rna_camera.c
trunk/blender/source/blender/makesrna/intern/rna_fcurve.c
trunk/blender/source/blender/windowmanager/intern/wm_gesture.c
trunk/blender/source/blender/windowmanager/intern/wm_operators.c
Modified: trunk/blender/source/blender/blenkernel/intern/depsgraph.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/depsgraph.c 2010-01-26 11:23:47 UTC (rev 26290)
+++ trunk/blender/source/blender/blenkernel/intern/depsgraph.c 2010-01-26 11:25:39 UTC (rev 26291)
@@ -29,12 +29,9 @@
#include <string.h>
#include <math.h>
-#ifdef _WIN32
-#include "BLI_winstuff.h"
-#endif
-
#include "BLI_blenlib.h"
#include "BLI_math.h"
+#include "BLI_winstuff.h"
#include "DNA_anim_types.h"
#include "DNA_action_types.h"
Modified: trunk/blender/source/blender/blenkernel/intern/unit.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/unit.c 2010-01-26 11:23:47 UTC (rev 26290)
+++ trunk/blender/source/blender/blenkernel/intern/unit.c 2010-01-26 11:25:39 UTC (rev 26291)
@@ -20,17 +20,13 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#define _USE_MATH_DEFINES
-
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <string.h>
-#include <math.h>
-#if defined(WIN32) && (!(defined snprintf))
-#define snprintf _snprintf
-#endif
+#include "BLI_math.h"
+#include "BLI_winstuff.h"
#define TEMP_STR_SIZE 256
Modified: trunk/blender/source/blender/blenlib/BLI_winstuff.h
===================================================================
--- trunk/blender/source/blender/blenlib/BLI_winstuff.h 2010-01-26 11:23:47 UTC (rev 26290)
+++ trunk/blender/source/blender/blenlib/BLI_winstuff.h 2010-01-26 11:25:39 UTC (rev 26291)
@@ -32,6 +32,8 @@
#ifndef __WINSTUFF_H__
#define __WINSTUFF_H__
+#ifdef _WIN32
+
#ifndef FREE_WINDOWS
#pragma warning(once: 4761 4305 4244 4018)
#endif
@@ -139,5 +141,7 @@
}
#endif
+#endif
+
#endif /* __WINSTUFF_H__ */
Modified: trunk/blender/source/blender/editors/animation/anim_draw.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_draw.c 2010-01-26 11:23:47 UTC (rev 26290)
+++ trunk/blender/source/blender/editors/animation/anim_draw.c 2010-01-26 11:25:39 UTC (rev 26291)
@@ -28,7 +28,6 @@
#include <string.h>
#include <stdio.h>
-#include <math.h>
#include "DNA_anim_types.h"
#include "DNA_action_types.h"
Modified: trunk/blender/source/blender/editors/mesh/loopcut.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/loopcut.c 2010-01-26 11:23:47 UTC (rev 26290)
+++ trunk/blender/source/blender/editors/mesh/loopcut.c 2010-01-26 11:25:39 UTC (rev 26291)
@@ -27,8 +27,6 @@
*/
#include <float.h>
-#define _USE_MATH_DEFINES
-#include <math.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
@@ -47,6 +45,7 @@
#include "BLI_blenlib.h"
#include "BLI_dynstr.h" /*for WM_operator_pystring */
#include "BLI_editVert.h"
+#include "BLI_math.h"
#include "BKE_blender.h"
#include "BKE_context.h"
Modified: trunk/blender/source/blender/makesrna/intern/rna_brush.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_brush.c 2010-01-26 11:23:47 UTC (rev 26290)
+++ trunk/blender/source/blender/makesrna/intern/rna_brush.c 2010-01-26 11:25:39 UTC (rev 26291)
@@ -21,10 +21,8 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
- #define _USE_MATH_DEFINES
#include <stdlib.h>
-#include <math.h>
#include "RNA_define.h"
#include "RNA_types.h"
@@ -34,7 +32,10 @@
#include "DNA_brush_types.h"
#include "DNA_texture_types.h"
+#include "BLI_math.h"
+
#include "IMB_imbuf.h"
+
#include "WM_types.h"
#ifdef RNA_RUNTIME
Modified: trunk/blender/source/blender/makesrna/intern/rna_camera.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_camera.c 2010-01-26 11:23:47 UTC (rev 26290)
+++ trunk/blender/source/blender/makesrna/intern/rna_camera.c 2010-01-26 11:25:39 UTC (rev 26291)
@@ -22,9 +22,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
-#define _USE_MATH_DEFINES
#include <stdlib.h>
-#include <math.h>
#include "RNA_define.h"
#include "RNA_types.h"
@@ -33,6 +31,8 @@
#include "DNA_camera_types.h"
+#include "BLI_math.h"
+
#include "WM_types.h"
#ifdef RNA_RUNTIME
Modified: trunk/blender/source/blender/makesrna/intern/rna_fcurve.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_fcurve.c 2010-01-26 11:23:47 UTC (rev 26290)
+++ trunk/blender/source/blender/makesrna/intern/rna_fcurve.c 2010-01-26 11:25:39 UTC (rev 26291)
@@ -22,10 +22,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
- #define _USE_MATH_DEFINES
-
#include <stdlib.h>
-#include <math.h>
#include "RNA_access.h"
#include "RNA_define.h"
@@ -40,6 +37,8 @@
#include "MEM_guardedalloc.h"
+#include "BLI_math.h"
+
#include "WM_types.h"
EnumPropertyItem fmodifier_type_items[] = {
Modified: trunk/blender/source/blender/windowmanager/intern/wm_gesture.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_gesture.c 2010-01-26 11:23:47 UTC (rev 26290)
+++ trunk/blender/source/blender/windowmanager/intern/wm_gesture.c 2010-01-26 11:25:39 UTC (rev 26291)
@@ -26,9 +26,6 @@
* ***** END GPL LICENSE BLOCK *****
*/
-#define _USE_MATH_DEFINES
-#include <math.h>
-
#include "DNA_screen_types.h"
#include "DNA_vec_types.h"
#include "DNA_userdef_types.h"
@@ -38,6 +35,7 @@
#include "BLI_blenlib.h"
#include "BLI_editVert.h" /* lasso tessellation */
+#include "BLI_math.h"
#include "BLI_scanfill.h" /* lasso tessellation */
#include "BKE_context.h"
Modified: trunk/blender/source/blender/windowmanager/intern/wm_operators.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_operators.c 2010-01-26 11:23:47 UTC (rev 26290)
+++ trunk/blender/source/blender/windowmanager/intern/wm_operators.c 2010-01-26 11:25:39 UTC (rev 26291)
@@ -27,8 +27,6 @@
*/
#include <float.h>
-#define _USE_MATH_DEFINES
-#include <math.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
@@ -48,6 +46,7 @@
#include "BLI_blenlib.h"
#include "BLI_dynstr.h" /*for WM_operator_pystring */
+#include "BLI_math.h"
#include "BLO_readfile.h"
More information about the Bf-blender-cvs
mailing list