diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-11-28 05:37:02 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-11-28 05:37:02 +0300 |
commit | a12fa185f8b098d89e13afe476e1c34b40d21f29 (patch) | |
tree | f77cf594924a0d0a76f25f2354a2aaa8b45e072b /source/blender/bmesh/operators | |
parent | bafccb00dec6d882c580102aa4d0b0889c898154 (diff) |
BMesh: use typed filter callbacks (const args too)
Diffstat (limited to 'source/blender/bmesh/operators')
-rw-r--r-- | source/blender/bmesh/operators/bmo_fill_attribute.c | 4 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_normals.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/bmesh/operators/bmo_fill_attribute.c b/source/blender/bmesh/operators/bmo_fill_attribute.c index 85bca744d86..233ed746ed4 100644 --- a/source/blender/bmesh/operators/bmo_fill_attribute.c +++ b/source/blender/bmesh/operators/bmo_fill_attribute.c @@ -53,9 +53,9 @@ static bool bm_loop_is_all_radial_tag(BMLoop *l) /** * Callback to run on source-loops for #BM_face_copy_shared */ -static bool bm_loop_is_face_untag(BMElem *ele, void *UNUSED(user_data)) +static bool bm_loop_is_face_untag(const BMLoop *l, void *UNUSED(user_data)) { - return (BM_elem_flag_test(((BMLoop *)ele)->f, BM_ELEM_TAG) == 0); + return (BM_elem_flag_test(l->f, BM_ELEM_TAG) == 0); } /** diff --git a/source/blender/bmesh/operators/bmo_normals.c b/source/blender/bmesh/operators/bmo_normals.c index 1f50feb6d6d..06ceece644b 100644 --- a/source/blender/bmesh/operators/bmo_normals.c +++ b/source/blender/bmesh/operators/bmo_normals.c @@ -41,9 +41,9 @@ #define FACE_FLIP (1 << 1) #define FACE_TEMP (1 << 2) -static bool bmo_recalc_normal_edge_filter_cb(BMElem *ele, void *UNUSED(user_data)) +static bool bmo_recalc_normal_edge_filter_cb(const BMElem *ele, void *UNUSED(user_data)) { - return BM_edge_is_manifold((BMEdge *)ele); + return BM_edge_is_manifold((const BMEdge *)ele); } /** @@ -229,7 +229,7 @@ static void bmo_recalc_face_normals_array(BMesh *bm, BMFace **faces, const int f do { BMLoop *l_other = l_iter->radial_next; - if ((l_other != l_iter) && bmo_recalc_normal_edge_filter_cb((BMElem *)l_iter->e, NULL)) { + if ((l_other != l_iter) && bmo_recalc_normal_edge_filter_cb((const BMElem *)l_iter->e, NULL)) { if (!BMO_elem_flag_test(bm, l_other->f, FACE_TEMP)) { BMO_elem_flag_enable(bm, l_other->f, FACE_TEMP); BMO_elem_flag_set(bm, l_other->f, FACE_FLIP, (l_other->v == l_iter->v) != flip_state); |