Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-06-19 22:59:54 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-06-19 22:59:54 +0400
commitd54d00ef845a7bb4f0d8e08133b2489983dbe907 (patch)
treeb95a9236b37fb5195100d3bfca19fe67152b342d /source/blender/bmesh
parent06e1bc6178fc22178b79763d392c8d58d06285fe (diff)
Remove paranoid null checks for editmesh EDBM_vert_at_index and friends (use asserts instead).
temp set BM_OMP_LIMIT to zero for better testing before release.
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r--source/blender/bmesh/bmesh_class.h2
-rw-r--r--source/blender/bmesh/intern/bmesh_marking.c6
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh.c2
3 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/bmesh/bmesh_class.h b/source/blender/bmesh/bmesh_class.h
index 8d95ab85df8..c92b049eafb 100644
--- a/source/blender/bmesh/bmesh_class.h
+++ b/source/blender/bmesh/bmesh_class.h
@@ -290,6 +290,6 @@ extern void bpy_bm_generic_invalidate(struct BPy_BMGeneric *self);
* but should not error on valid cases */
#define BM_LOOP_RADIAL_MAX 10000
#define BM_NGON_MAX 100000
-#define BM_OMP_LIMIT 10000 /* setting zero so we can catch bugs in OpenMP/BMesh */
+#define BM_OMP_LIMIT 0 /* 10000 */ /* setting zero so we can catch bugs in OpenMP/BMesh */
#endif /* __BMESH_CLASS_H__ */
diff --git a/source/blender/bmesh/intern/bmesh_marking.c b/source/blender/bmesh/intern/bmesh_marking.c
index 2608a79d455..313d76721fa 100644
--- a/source/blender/bmesh/intern/bmesh_marking.c
+++ b/source/blender/bmesh/intern/bmesh_marking.c
@@ -498,6 +498,8 @@ static int bm_mesh_flag_count(BMesh *bm, const char htype, const char hflag,
BMIter iter;
int tot = 0;
+ BLI_assert((htype & ~BM_ALL_NOLOOP) == 0);
+
if (htype & BM_VERT) {
for (ele = BM_iter_new(&iter, bm, BM_VERTS_OF_MESH, NULL); ele; ele = BM_iter_step(&iter)) {
if (respecthide && BM_elem_flag_test(ele, BM_ELEM_HIDDEN)) continue;
@@ -803,6 +805,8 @@ void BM_mesh_elem_hflag_disable_test(BMesh *bm, const char htype, const char hfl
int i;
+ BLI_assert((htype & ~BM_ALL_NOLOOP) == 0);
+
if (hflag & BM_ELEM_SELECT) {
BM_select_history_clear(bm);
}
@@ -872,6 +876,8 @@ void BM_mesh_elem_hflag_enable_test(BMesh *bm, const char htype, const char hfla
BMElem *ele;
int i;
+ BLI_assert((htype & ~BM_ALL_NOLOOP) == 0);
+
if (hflag & BM_ELEM_SELECT) {
BM_select_history_clear(bm);
}
diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c
index 79dacaad2fa..4027d4b2c19 100644
--- a/source/blender/bmesh/intern/bmesh_mesh.c
+++ b/source/blender/bmesh/intern/bmesh_mesh.c
@@ -628,6 +628,8 @@ void BM_mesh_elem_index_validate(BMesh *bm, const char *location, const char *fu
*/
int BM_mesh_elem_count(BMesh *bm, const char htype)
{
+ BLI_assert((htype & ~BM_ALL_NOLOOP) == 0);
+
switch (htype) {
case BM_VERT: return bm->totvert;
case BM_EDGE: return bm->totedge;