diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-20 21:40:16 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-20 21:40:16 +0300 |
commit | 2fb9c8ef125f975596b6ef9c8f021403f8279bdf (patch) | |
tree | 02633f97a682dcd4935bf9b3170dfe5841ed048a /source/blender/bmesh/operators | |
parent | 6b9ce24338de1a33dbf41e14e85a1630b1a2b899 (diff) |
Cleanup: add missing macros to clang-format
Diffstat (limited to 'source/blender/bmesh/operators')
-rw-r--r-- | source/blender/bmesh/operators/bmo_extrude.c | 3 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_planar_faces.c | 6 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_primitive.c | 24 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_rotate_edges.c | 6 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_smooth_laplacian.c | 6 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_subdivide.c | 12 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_subdivide_edgering.c | 6 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_utils.c | 12 |
8 files changed, 25 insertions, 50 deletions
diff --git a/source/blender/bmesh/operators/bmo_extrude.c b/source/blender/bmesh/operators/bmo_extrude.c index cec7a920abb..7d557204369 100644 --- a/source/blender/bmesh/operators/bmo_extrude.c +++ b/source/blender/bmesh/operators/bmo_extrude.c @@ -740,8 +740,7 @@ static void solidify_add_thickness(BMesh *bm, const float dist) /* array for receiving angles from angle_poly_v3 */ float **verts = BLI_buffer_reinit_data(&verts_buf, float *, f->len); - BM_ITER_ELEM_INDEX(l, &loopIter, f, BM_LOOPS_OF_FACE, i) - { + BM_ITER_ELEM_INDEX (l, &loopIter, f, BM_LOOPS_OF_FACE, i) { verts[i] = l->v->co; } diff --git a/source/blender/bmesh/operators/bmo_planar_faces.c b/source/blender/bmesh/operators/bmo_planar_faces.c index ca336175f19..30aa473b2c7 100644 --- a/source/blender/bmesh/operators/bmo_planar_faces.c +++ b/source/blender/bmesh/operators/bmo_planar_faces.c @@ -56,8 +56,7 @@ void bmo_planar_faces_exec(BMesh *bm, BMOperator *op) faces_center = MEM_mallocN(sizeof(*faces_center) * faces_num, __func__); shared_vert_num = 0; - BMO_ITER_INDEX(f, &oiter, op->slots_in, "faces", BM_FACE, i) - { + BMO_ITER_INDEX (f, &oiter, op->slots_in, "faces", BM_FACE, i) { BMLoop *l_iter, *l_first; if (f->len == 3) { @@ -84,8 +83,7 @@ void bmo_planar_faces_exec(BMesh *bm, BMOperator *op) GHashIterator gh_iter; bool changed = false; - BMO_ITER_INDEX(f, &oiter, op->slots_in, "faces", BM_FACE, i) - { + BMO_ITER_INDEX (f, &oiter, op->slots_in, "faces", BM_FACE, i) { BMLoop *l_iter, *l_first; float plane[4]; diff --git a/source/blender/bmesh/operators/bmo_primitive.c b/source/blender/bmesh/operators/bmo_primitive.c index bea7c56b1d4..3ed74d68317 100644 --- a/source/blender/bmesh/operators/bmo_primitive.c +++ b/source/blender/bmesh/operators/bmo_primitive.c @@ -819,8 +819,7 @@ void BM_mesh_calc_uvs_grid(BMesh *bm, continue; } - BM_ITER_ELEM_INDEX(l, &liter, f, BM_LOOPS_OF_FACE, loop_index) - { + BM_ITER_ELEM_INDEX (l, &liter, f, BM_LOOPS_OF_FACE, loop_index) { MLoopUV *luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); switch (loop_index) { @@ -1022,8 +1021,7 @@ void bmo_create_icosphere_exec(BMesh *bm, BMOperator *op) * so it's best to set the UVs right after the face is created. */ if (calc_uvs) { int loop_index; - BM_ITER_ELEM_INDEX(l, &liter, f, BM_LOOPS_OF_FACE, loop_index) - { + BM_ITER_ELEM_INDEX (l, &liter, f, BM_LOOPS_OF_FACE, loop_index) { MLoopUV *luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); luv->uv[0] = icouvs[uvi][0]; luv->uv[1] = icouvs[uvi][1]; @@ -1077,8 +1075,7 @@ static void bm_mesh_calc_uvs_sphere_face(BMFace *f, const int cd_loop_uv_offset) /* If face has 3 vertices, it's a polar face, in which case we need to * compute a nearby to determine its latitude. */ float avgx = 0.0f, avgy = 0.0f; - BM_ITER_ELEM_INDEX(l, &iter, f, BM_LOOPS_OF_FACE, loop_index) - { + BM_ITER_ELEM_INDEX (l, &iter, f, BM_LOOPS_OF_FACE, loop_index) { if (f->len == 3) { avgx += l->v->co[0]; avgy += l->v->co[1]; @@ -1087,8 +1084,7 @@ static void bm_mesh_calc_uvs_sphere_face(BMFace *f, const int cd_loop_uv_offset) avgx /= 3.0f; avgy /= 3.0f; - BM_ITER_ELEM_INDEX(l, &iter, f, BM_LOOPS_OF_FACE, loop_index) - { + BM_ITER_ELEM_INDEX (l, &iter, f, BM_LOOPS_OF_FACE, loop_index) { MLoopUV *luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); float x = l->v->co[0]; float y = l->v->co[1]; @@ -1164,8 +1160,7 @@ void BM_mesh_calc_uvs_sphere(BMesh *bm, const short oflag, const int cd_loop_uv_ if (!BMO_face_flag_test(bm, f, oflag)) { continue; } - BM_ITER_ELEM_INDEX(l, &iter2, f, BM_LOOPS_OF_FACE, loop_index) - { + BM_ITER_ELEM_INDEX (l, &iter2, f, BM_LOOPS_OF_FACE, loop_index) { MLoopUV *luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); if (luv->uv[0] < minx) { minx = luv->uv[0]; @@ -1177,8 +1172,7 @@ void BM_mesh_calc_uvs_sphere(BMesh *bm, const short oflag, const int cd_loop_uv_ if (!BMO_face_flag_test(bm, f, oflag)) { continue; } - BM_ITER_ELEM_INDEX(l, &iter2, f, BM_LOOPS_OF_FACE, loop_index) - { + BM_ITER_ELEM_INDEX (l, &iter2, f, BM_LOOPS_OF_FACE, loop_index) { MLoopUV *luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); luv->uv[0] -= minx; } @@ -1582,8 +1576,7 @@ void BM_mesh_calc_uvs_cone(BMesh *bm, if (f->len == 4 && radius_top && radius_bottom) { /* side face - so unwrap it in a rectangle */ - BM_ITER_ELEM_INDEX(l, &liter, f, BM_LOOPS_OF_FACE, loop_index) - { + BM_ITER_ELEM_INDEX (l, &liter, f, BM_LOOPS_OF_FACE, loop_index) { MLoopUV *luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); switch (loop_index) { @@ -1720,8 +1713,7 @@ void BM_mesh_calc_uvs_cube(BMesh *bm, const short oflag) continue; } - BM_ITER_ELEM_INDEX(l, &liter, f, BM_LOOPS_OF_FACE, loop_index) - { + BM_ITER_ELEM_INDEX (l, &liter, f, BM_LOOPS_OF_FACE, loop_index) { MLoopUV *luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); luv->uv[0] = x; diff --git a/source/blender/bmesh/operators/bmo_rotate_edges.c b/source/blender/bmesh/operators/bmo_rotate_edges.c index e017806df0d..b999e942d10 100644 --- a/source/blender/bmesh/operators/bmo_rotate_edges.c +++ b/source/blender/bmesh/operators/bmo_rotate_edges.c @@ -116,8 +116,7 @@ static void bm_rotate_edges_shared( BMOIter siter; BMEdge *e; uint i; - BMO_ITER_INDEX(e, &siter, op->slots_in, "edges", BM_EDGE, i) - { + BMO_ITER_INDEX (e, &siter, op->slots_in, "edges", BM_EDGE, i) { BM_elem_index_set(e, BM_edge_is_manifold(e) ? i : -1); /* set_dirty! */ eheap_table[i] = NULL; } @@ -138,8 +137,7 @@ static void bm_rotate_edges_shared( BMOIter siter; BMEdge *e; uint i; - BMO_ITER_INDEX(e, &siter, op->slots_in, "edges", BM_EDGE, i) - { + BMO_ITER_INDEX (e, &siter, op->slots_in, "edges", BM_EDGE, i) { BLI_assert(eheap_table[i] == NULL); bool ok = (BM_elem_index_get(e) != -1) && BM_edge_rotate_check(e); diff --git a/source/blender/bmesh/operators/bmo_smooth_laplacian.c b/source/blender/bmesh/operators/bmo_smooth_laplacian.c index 85f62241782..01bdf5d933a 100644 --- a/source/blender/bmesh/operators/bmo_smooth_laplacian.c +++ b/source/blender/bmesh/operators/bmo_smooth_laplacian.c @@ -205,8 +205,7 @@ static void init_laplacian_matrix(LaplacianSystem *sys) BM_ITER_MESH (f, &fiter, sys->bm, BM_FACES_OF_MESH) { if (BM_elem_flag_test(f, BM_ELEM_SELECT)) { - BM_ITER_ELEM_INDEX(vn, &vi, f, BM_VERTS_OF_FACE, i) - { + BM_ITER_ELEM_INDEX (vn, &vi, f, BM_VERTS_OF_FACE, i) { vf[i] = vn; } has_4_vert = (i == 4) ? 1 : 0; @@ -305,8 +304,7 @@ static void fill_laplacian_matrix(LaplacianSystem *sys) BM_ITER_MESH (f, &fiter, sys->bm, BM_FACES_OF_MESH) { if (BM_elem_flag_test(f, BM_ELEM_SELECT)) { - BM_ITER_ELEM_INDEX(vn, &vi, f, BM_VERTS_OF_FACE, i) - { + BM_ITER_ELEM_INDEX (vn, &vi, f, BM_VERTS_OF_FACE, i) { vf[i] = vn; } has_4_vert = (i == 4) ? 1 : 0; diff --git a/source/blender/bmesh/operators/bmo_subdivide.c b/source/blender/bmesh/operators/bmo_subdivide.c index 869c61832f9..66021624025 100644 --- a/source/blender/bmesh/operators/bmo_subdivide.c +++ b/source/blender/bmesh/operators/bmo_subdivide.c @@ -1042,8 +1042,7 @@ void bmo_subdivide_edges_exec(BMesh *bm, BMOperator *op) BLI_array_grow_items(verts, face->len); totesel = 0; - BM_ITER_ELEM_INDEX(l_new, &liter, face, BM_LOOPS_OF_FACE, i) - { + BM_ITER_ELEM_INDEX (l_new, &liter, face, BM_LOOPS_OF_FACE, i) { edges[i] = l_new->e; verts[i] = l_new->v; @@ -1181,8 +1180,7 @@ void bmo_subdivide_edges_exec(BMesh *bm, BMOperator *op) /* for case of two edges, connecting them shouldn't be too hard */ BLI_array_grow_items(loops, face->len); - BM_ITER_ELEM_INDEX(l, &liter, face, BM_LOOPS_OF_FACE, a) - { + BM_ITER_ELEM_INDEX (l, &liter, face, BM_LOOPS_OF_FACE, a) { loops[a] = l; } @@ -1283,8 +1281,7 @@ void bmo_subdivide_edges_exec(BMesh *bm, BMOperator *op) } a = 0; - BM_ITER_ELEM_INDEX(l_new, &liter, face, BM_LOOPS_OF_FACE, j) - { + BM_ITER_ELEM_INDEX (l_new, &liter, face, BM_LOOPS_OF_FACE, j) { if (l_new->v == fd->start) { a = j + 1; break; @@ -1293,8 +1290,7 @@ void bmo_subdivide_edges_exec(BMesh *bm, BMOperator *op) BLI_array_grow_items(verts, face->len); - BM_ITER_ELEM_INDEX(l_new, &liter, face, BM_LOOPS_OF_FACE, j) - { + BM_ITER_ELEM_INDEX (l_new, &liter, face, BM_LOOPS_OF_FACE, j) { b = (j - a + face->len) % face->len; verts[b] = l_new->v; } diff --git a/source/blender/bmesh/operators/bmo_subdivide_edgering.c b/source/blender/bmesh/operators/bmo_subdivide_edgering.c index c6d2910d214..6baf56f1723 100644 --- a/source/blender/bmesh/operators/bmo_subdivide_edgering.c +++ b/source/blender/bmesh/operators/bmo_subdivide_edgering.c @@ -1183,8 +1183,7 @@ void bmo_subdivide_edgering_exec(BMesh *bm, BMOperator *op) lpair_arr = BLI_array_alloca(lpair_arr, BLI_gset_len(eloop_pairs_gs)); /* first cache pairs */ - GSET_ITER_INDEX(gs_iter, eloop_pairs_gs, i) - { + GSET_ITER_INDEX (gs_iter, eloop_pairs_gs, i) { GHashPair *eloop_pair = BLI_gsetIterator_getKey(&gs_iter); struct BMEdgeLoopStore *el_store_a = (void *)eloop_pair->first; struct BMEdgeLoopStore *el_store_b = (void *)eloop_pair->second; @@ -1201,8 +1200,7 @@ void bmo_subdivide_edgering_exec(BMesh *bm, BMOperator *op) BLI_assert(bm_verts_tag_count(bm) == 0); } - GSET_ITER_INDEX(gs_iter, eloop_pairs_gs, i) - { + GSET_ITER_INDEX (gs_iter, eloop_pairs_gs, i) { GHashPair *eloop_pair = BLI_gsetIterator_getKey(&gs_iter); struct BMEdgeLoopStore *el_store_a = (void *)eloop_pair->first; struct BMEdgeLoopStore *el_store_b = (void *)eloop_pair->second; diff --git a/source/blender/bmesh/operators/bmo_utils.c b/source/blender/bmesh/operators/bmo_utils.c index 6495f2b0afe..bc06d5e454b 100644 --- a/source/blender/bmesh/operators/bmo_utils.c +++ b/source/blender/bmesh/operators/bmo_utils.c @@ -503,15 +503,13 @@ static void bm_face_reverse_uvs(BMFace *f, const int cd_loop_uv_offset) float(*uvs)[2] = BLI_array_alloca(uvs, f->len); - BM_ITER_ELEM_INDEX(l, &iter, f, BM_LOOPS_OF_FACE, i) - { + BM_ITER_ELEM_INDEX (l, &iter, f, BM_LOOPS_OF_FACE, i) { MLoopUV *luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); copy_v2_v2(uvs[i], luv->uv); } /* now that we have the uvs in the array, reverse! */ - BM_ITER_ELEM_INDEX(l, &iter, f, BM_LOOPS_OF_FACE, i) - { + BM_ITER_ELEM_INDEX (l, &iter, f, BM_LOOPS_OF_FACE, i) { /* current loop uv is the previous loop uv */ MLoopUV *luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); copy_v2_v2(luv->uv, uvs[(f->len - i - 1)]); @@ -607,15 +605,13 @@ static void bm_face_reverse_colors(BMFace *f, const int cd_loop_color_offset) MLoopCol *cols = BLI_array_alloca(cols, f->len); - BM_ITER_ELEM_INDEX(l, &iter, f, BM_LOOPS_OF_FACE, i) - { + BM_ITER_ELEM_INDEX (l, &iter, f, BM_LOOPS_OF_FACE, i) { MLoopCol *lcol = BM_ELEM_CD_GET_VOID_P(l, cd_loop_color_offset); cols[i] = *lcol; } /* now that we have the uvs in the array, reverse! */ - BM_ITER_ELEM_INDEX(l, &iter, f, BM_LOOPS_OF_FACE, i) - { + BM_ITER_ELEM_INDEX (l, &iter, f, BM_LOOPS_OF_FACE, i) { /* current loop uv is the previous loop color */ MLoopCol *lcol = BM_ELEM_CD_GET_VOID_P(l, cd_loop_color_offset); *lcol = cols[(f->len - i - 1)]; |