From 86d3a1f683ccc5905580e2a11222217d227db7de Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 25 Apr 2015 12:29:52 +1000 Subject: [PATCH] Cleanup --- source/blender/editors/include/ED_mesh.h | 2 +- source/blender/editors/mesh/editmesh_knife.c | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 55a254c7941..ea544135d3b 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -144,7 +144,7 @@ struct BMVert *EDBM_vert_find_nearest( struct ViewContext *vc, float *r_dist); struct BMEdge *EDBM_edge_find_nearest_ex( - struct ViewContext *vc,float *r_dist, + struct ViewContext *vc, float *r_dist, float *r_dist_center, const bool use_select_bias, const bool use_cycle, struct BMEdge **r_eed_zbuf); diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index f62fdf70192..df91679b5f0 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -1320,8 +1320,9 @@ static BMElem *bm_elem_from_knife_edge(KnifeEdge *kfe) } /* Do edges e1 and e2 go between exactly the same coordinates? */ -static bool coinciding_edges(BMEdge *e1, BMEdge *e2) { - float *co11, *co12, *co21, *co22; +static bool coinciding_edges(BMEdge *e1, BMEdge *e2) +{ + const float *co11, *co12, *co21, *co22; co11 = e1->v1->co; co12 = e1->v2->co; @@ -1329,9 +1330,12 @@ static bool coinciding_edges(BMEdge *e1, BMEdge *e2) { co22 = e2->v2->co; if ((equals_v3v3(co11, co21) && equals_v3v3(co12, co22)) || (equals_v3v3(co11, co22) && equals_v3v3(co12, co21))) + { return true; - else + } + else { return false; + } } /* Callback used in point_is_visible to exclude hits on the faces that are the same @@ -1354,7 +1358,7 @@ static bool bm_ray_cast_cb_elem_not_in_face_check(BMFace *f, void *user_data) ans = !BM_edge_in_face(e, f); if (ans) { /* Is it a boundary edge, coincident with a split edge? */ - if (BM_edge_face_count(e) == 1) { + if (BM_edge_is_boundary(e)) { BM_ITER_ELEM(e2, &iter, f, BM_EDGES_OF_FACE) { if (coinciding_edges(e, e2)) { ans = false;