[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54983] trunk/blender/source/blender: enable triangulation with collada, disable BLI_STATIC_ASSERT for C++.

Campbell Barton ideasman42 at gmail.com
Sun Mar 3 02:24:10 CET 2013


Revision: 54983
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54983
Author:   campbellbarton
Date:     2013-03-03 01:24:09 +0000 (Sun, 03 Mar 2013)
Log Message:
-----------
enable triangulation with collada, disable BLI_STATIC_ASSERT for C++.

Modified Paths:
--------------
    trunk/blender/source/blender/blenlib/BLI_utildefines.h
    trunk/blender/source/blender/collada/collada_utils.cpp

Modified: trunk/blender/source/blender/blenlib/BLI_utildefines.h
===================================================================
--- trunk/blender/source/blender/blenlib/BLI_utildefines.h	2013-03-02 23:42:03 UTC (rev 54982)
+++ trunk/blender/source/blender/blenlib/BLI_utildefines.h	2013-03-03 01:24:09 UTC (rev 54983)
@@ -399,7 +399,8 @@
 #  define BLI_assert(a) (void)0
 #endif
 
-#if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 406))  /* gcc4.6+ only */
+/* C++ can't use _Static_assert, expects static_assert() but c++0x only */
+#if (!defined(__cplusplus)) && (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 406))  /* gcc4.6+ only */
 #  define BLI_STATIC_ASSERT(a, msg) _Static_assert(a, msg);
 #else
    /* TODO msvc, clang */

Modified: trunk/blender/source/blender/collada/collada_utils.cpp
===================================================================
--- trunk/blender/source/blender/collada/collada_utils.cpp	2013-03-02 23:42:03 UTC (rev 54982)
+++ trunk/blender/source/blender/collada/collada_utils.cpp	2013-03-03 01:24:09 UTC (rev 54983)
@@ -35,7 +35,6 @@
 #include "collada_utils.h"
 
 extern "C" {
-
 #include "DNA_modifier_types.h"
 #include "DNA_customdata_types.h"
 #include "DNA_object_types.h"
@@ -45,6 +44,7 @@
 
 #include "BLI_math.h"
 #include "BLI_linklist.h"
+
 #include "BKE_context.h"
 #include "BKE_customdata.h"
 #include "BKE_depsgraph.h"
@@ -56,9 +56,7 @@
 
 #include "WM_api.h" // XXX hrm, see if we can do without this
 #include "WM_types.h"
-
-//#include "bmesh.h"
-
+#include "bmesh.h"
 }
 
 float bc_get_float_value(const COLLADAFW::FloatOrDoubleArray& array, unsigned int index)
@@ -386,13 +384,10 @@
 void bc_triangulate_mesh(Mesh *me) {
 	bool use_beauty = false;
 	bool tag_only   = false;
-
-/*
+	 
 	BMesh *bm = BM_mesh_create(&bm_mesh_allocsize_default);
 	BM_mesh_bm_from_me(bm, me, FALSE, 0);
 	BM_mesh_triangulate(bm, use_beauty, tag_only, NULL, NULL);
 	BM_mesh_bm_to_me(bm, me, FALSE);
 	BM_mesh_free(bm);
-*/
-
 }




More information about the Bf-blender-cvs mailing list