From fbd78a8d78f460d1ae2972538139ac1602c012f6 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 23 Sep 2022 15:24:20 +1000 Subject: Cleanup: use ELEM macro --- source/blender/bmesh/tools/bmesh_bevel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/bmesh/tools/bmesh_bevel.c') diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c index eaf697e78f7..b08051341be 100644 --- a/source/blender/bmesh/tools/bmesh_bevel.c +++ b/source/blender/bmesh/tools/bmesh_bevel.c @@ -4799,7 +4799,7 @@ static float projected_boundary_area(BevVert *bv, BMFace *f) find_face_internal_boundverts(bv, f, unsnapped); do { float *co = v->nv.v->co; - if (v == unsnapped[0] || v == unsnapped[1] || v == unsnapped[2]) { + if (ELEM(v, unsnapped[0], unsnapped[1], unsnapped[2])) { mul_v2_m3v3(proj_co[i], axis_mat, co); } else { @@ -4922,7 +4922,7 @@ static void build_center_ngon(BevelParams *bp, BMesh *bm, BevVert *bv, int mat_n BLI_array_append(vv, mesh_vert(vm, i, ns2, ns2)->v); if (frep) { BLI_array_append(vf, frep); - if (v == frep_unsnapped[0] || v == frep_unsnapped[1] || v == frep_unsnapped[2]) { + if (ELEM(v, frep_unsnapped[0], frep_unsnapped[1], frep_unsnapped[2])) { BLI_array_append(ve, NULL); } else { @@ -5299,7 +5299,7 @@ static void snap_edges_for_vmesh_vert(int i, int previ = (i + n_bndv - 1) % n_bndv; /* Make jj and kk be the j and k indices for this corner. */ int jj = corner < 2 ? j : j + 1; - int kk = (corner == 0 || corner == 3) ? k : k + 1; + int kk = ELEM(corner, 0, 3) ? k : k + 1; if (jj < ns2 && kk < ns2) { ; /* No snap. */ } @@ -5765,7 +5765,7 @@ static BMFace *bevel_build_poly(BevelParams *bp, BMesh *bm, BevVert *bv) BLI_array_append(bmverts, bndv->nv.v); if (repface) { BLI_array_append(bmfaces, repface); - if (bndv == unsnapped[0] || bndv == unsnapped[1] || bndv == unsnapped[2]) { + if (ELEM(bndv, unsnapped[0], unsnapped[1], unsnapped[2])) { BLI_array_append(bmedges, NULL); } else { -- cgit v1.2.3