diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-03-03 05:24:09 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-03-03 05:24:09 +0400 |
commit | c6642b8ec8c2b12aed3bf9c72d7378bcfd75da77 (patch) | |
tree | 1ff85c0025cdc0e996f4aa8a06659801d3dd314c | |
parent | 24437b6171396ead93756db7026688543adcc9fa (diff) |
enable triangulation with collada, disable BLI_STATIC_ASSERT for C++.
-rw-r--r-- | source/blender/blenlib/BLI_utildefines.h | 3 | ||||
-rw-r--r-- | source/blender/collada/collada_utils.cpp | 11 |
2 files changed, 5 insertions, 9 deletions
diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h index 95ad786c7c2..bbafd28ddbc 100644 --- a/source/blender/blenlib/BLI_utildefines.h +++ b/source/blender/blenlib/BLI_utildefines.h @@ -399,7 +399,8 @@ typedef bool _BLI_Bool; # 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 */ diff --git a/source/blender/collada/collada_utils.cpp b/source/blender/collada/collada_utils.cpp index cc7ba4f50fa..c56aa3fdaf0 100644 --- a/source/blender/collada/collada_utils.cpp +++ b/source/blender/collada/collada_utils.cpp @@ -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 @@ extern "C" { #include "BLI_math.h" #include "BLI_linklist.h" + #include "BKE_context.h" #include "BKE_customdata.h" #include "BKE_depsgraph.h" @@ -56,9 +56,7 @@ extern "C" { #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_match_scale(std::vector<Object *> *objects_done, 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); -*/ - } |