From 20869065b86263f72e469df17354bd6631be3712 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 3 Jul 2020 14:37:53 +0200 Subject: Cleanup: BMesh, Clang-Tidy else-after-return fixes This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/bmesh` module. No functional changes. --- source/blender/bmesh/intern/bmesh_mesh.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'source/blender/bmesh/intern/bmesh_mesh.c') diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c index fe7c9dba08e..ffe84f93679 100644 --- a/source/blender/bmesh/intern/bmesh_mesh.c +++ b/source/blender/bmesh/intern/bmesh_mesh.c @@ -650,7 +650,7 @@ bool BM_loop_check_cyclic_smooth_fan(BMLoop *l_curr) return false; } /* Smooth loop/edge... */ - else if (BM_elem_flag_test(lfan_pivot_next, BM_ELEM_TAG)) { + if (BM_elem_flag_test(lfan_pivot_next, BM_ELEM_TAG)) { if (lfan_pivot_next == l_curr) { /* We walked around a whole cyclic smooth fan * without finding any already-processed loop, @@ -660,10 +660,8 @@ bool BM_loop_check_cyclic_smooth_fan(BMLoop *l_curr) /* ... already checked in some previous looping, we can abort. */ return false; } - else { - /* ... we can skip it in future, and keep checking the smooth fan. */ - BM_elem_flag_enable(lfan_pivot_next, BM_ELEM_TAG); - } + /* ... we can skip it in future, and keep checking the smooth fan. */ + BM_elem_flag_enable(lfan_pivot_next, BM_ELEM_TAG); } } @@ -2389,9 +2387,7 @@ BMVert *BM_vert_at_index_find_or_table(BMesh *bm, const int index) if ((bm->elem_table_dirty & BM_VERT) == 0) { return (index < bm->totvert) ? bm->vtable[index] : NULL; } - else { - return BM_vert_at_index_find(bm, index); - } + return BM_vert_at_index_find(bm, index); } BMEdge *BM_edge_at_index_find_or_table(BMesh *bm, const int index) @@ -2399,9 +2395,7 @@ BMEdge *BM_edge_at_index_find_or_table(BMesh *bm, const int index) if ((bm->elem_table_dirty & BM_EDGE) == 0) { return (index < bm->totedge) ? bm->etable[index] : NULL; } - else { - return BM_edge_at_index_find(bm, index); - } + return BM_edge_at_index_find(bm, index); } BMFace *BM_face_at_index_find_or_table(BMesh *bm, const int index) @@ -2409,9 +2403,7 @@ BMFace *BM_face_at_index_find_or_table(BMesh *bm, const int index) if ((bm->elem_table_dirty & BM_FACE) == 0) { return (index < bm->totface) ? bm->ftable[index] : NULL; } - else { - return BM_face_at_index_find(bm, index); - } + return BM_face_at_index_find(bm, index); } /** -- cgit v1.2.3