From 690b90f1e2cb949a3cdfb02678be844c4808f2cb Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 12 Apr 2015 15:21:40 +1000 Subject: BMesh: minor optimization counting adjacent data add BM_***_count_is_over(), _count_is_equal() Useful if we only want to know if the count is a smaller value. --- source/blender/editors/mesh/editmesh_rip.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/mesh/editmesh_rip.c') diff --git a/source/blender/editors/mesh/editmesh_rip.c b/source/blender/editors/mesh/editmesh_rip.c index ead243d6de8..45e16ceff7b 100644 --- a/source/blender/editors/mesh/editmesh_rip.c +++ b/source/blender/editors/mesh/editmesh_rip.c @@ -587,8 +587,8 @@ static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, const wmEvent *eve /* if we are ripping a single vertex from 3 faces, * then measure the distance to the face corner as well as the edge */ - if (BM_vert_face_count(v) == 3 && - BM_vert_edge_count(v) == 3) + if (BM_vert_face_count_is_equal(v, 3) && + BM_vert_edge_count_is_equal(v, 3)) { BMEdge *e_all[3]; BMLoop *l_all[3]; @@ -735,7 +735,7 @@ static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, const wmEvent *eve * but both allocate fill */ /* rip two adjacent edges */ - if (BM_edge_is_boundary(e2) || BM_vert_face_count(v) == 2) { + if (BM_edge_is_boundary(e2) || BM_vert_face_count_is_equal(v, 2)) { /* Don't run the edge split operator in this case */ BMVert *v_rip; -- cgit v1.2.3