diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-05-04 18:26:39 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-05-04 18:35:09 +0300 |
commit | e30f0427a5eb2ad4437e3dc61991e2d8127bf01d (patch) | |
tree | 8e6f67b707bd1332886fb417034b0c4d173ef573 /source/blender/bmesh | |
parent | 875df1e2b9a92eb49269a9040528bce1af1018b1 (diff) |
Fix error in BM_face_exists_overlap_subset
Was re-using loop index, thanks to @bzztploink for spotting!
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_queries.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/bmesh/intern/bmesh_queries.c b/source/blender/bmesh/intern/bmesh_queries.c index ffad3e59e47..9b074dc4db4 100644 --- a/source/blender/bmesh/intern/bmesh_queries.c +++ b/source/blender/bmesh/intern/bmesh_queries.c @@ -2186,14 +2186,13 @@ bool BM_face_exists_overlap_subset(BMVert **varr, const int len) { BMIter viter; BMFace *f; - int i; bool is_init = false; bool is_overlap = false; LinkNode *f_lnk = NULL; #ifdef DEBUG /* check flag isn't already set */ - for (i = 0; i < len; i++) { + for (int i = 0; i < len; i++) { BLI_assert(BM_ELEM_API_FLAG_TEST(varr[i], _FLAG_OVERLAP) == 0); BM_ITER_ELEM (f, &viter, varr[i], BM_FACES_OF_VERT) { BLI_assert(BM_ELEM_API_FLAG_TEST(f, _FLAG_OVERLAP) == 0); @@ -2201,7 +2200,7 @@ bool BM_face_exists_overlap_subset(BMVert **varr, const int len) } #endif - for (i = 0; i < len; i++) { + for (int i = 0; i < len; i++) { BM_ITER_ELEM (f, &viter, varr[i], BM_FACES_OF_VERT) { if ((f->len <= len) && (BM_ELEM_API_FLAG_TEST(f, _FLAG_OVERLAP) == 0)) { /* check if all vers in this face are flagged*/ @@ -2209,8 +2208,8 @@ bool BM_face_exists_overlap_subset(BMVert **varr, const int len) if (is_init == false) { is_init = true; - for (i = 0; i < len; i++) { - BM_ELEM_API_FLAG_ENABLE(varr[i], _FLAG_OVERLAP); + for (int j = 0; j < len; j++) { + BM_ELEM_API_FLAG_ENABLE(varr[j], _FLAG_OVERLAP); } } @@ -2234,7 +2233,7 @@ bool BM_face_exists_overlap_subset(BMVert **varr, const int len) } if (is_init == true) { - for (i = 0; i < len; i++) { + for (int i = 0; i < len; i++) { BM_ELEM_API_FLAG_DISABLE(varr[i], _FLAG_OVERLAP); } } |