diff options
Diffstat (limited to 'source/blender/bmesh/intern')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_construct.c | 2 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_operators.c | 6 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_structure.c | 2 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_walkers_impl.c | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/bmesh/intern/bmesh_construct.c b/source/blender/bmesh/intern/bmesh_construct.c index ca5693aa5ba..8631c224ce0 100644 --- a/source/blender/bmesh/intern/bmesh_construct.c +++ b/source/blender/bmesh/intern/bmesh_construct.c @@ -335,7 +335,7 @@ BMFace *BM_face_create_ngon_verts(BMesh *bm, /* we want to use the reverse winding to the existing order */ BM_edge_ordered_verts(edge_arr[i], &test_v2, &test_v1); winding[(vert_arr[i_prev] == test_v2)]++; - BLI_assert(vert_arr[i_prev] == test_v2 || vert_arr[i_prev] == test_v1); + BLI_assert(ELEM(vert_arr[i_prev], test_v2, test_v1)); } } diff --git a/source/blender/bmesh/intern/bmesh_operators.c b/source/blender/bmesh/intern/bmesh_operators.c index c5e030c436a..c2421939aa8 100644 --- a/source/blender/bmesh/intern/bmesh_operators.c +++ b/source/blender/bmesh/intern/bmesh_operators.c @@ -963,7 +963,7 @@ void BMO_slot_buffer_from_single(BMOperator *op, BMOpSlot *slot, BMHeader *ele) BMO_ASSERT_SLOT_IN_OP(slot, op); BLI_assert(slot->slot_type == BMO_OP_SLOT_ELEMENT_BUF); BLI_assert(slot->slot_subtype.elem & BMO_OP_SLOT_SUBTYPE_ELEM_IS_SINGLE); - BLI_assert(slot->len == 0 || slot->len == 1); + BLI_assert(ELEM(slot->len, 0, 1)); BLI_assert(slot->slot_subtype.elem & ele->htype); @@ -979,7 +979,7 @@ void BMO_slot_buffer_from_array(BMOperator *op, { BMO_ASSERT_SLOT_IN_OP(slot, op); BLI_assert(slot->slot_type == BMO_OP_SLOT_ELEMENT_BUF); - BLI_assert(slot->len == 0 || slot->len == ele_buffer_len); + BLI_assert(ELEM(slot->len, 0, ele_buffer_len)); if (slot->data.buf == NULL) { slot->data.buf = BLI_memarena_alloc(op->arena, sizeof(*slot->data.buf) * ele_buffer_len); @@ -993,7 +993,7 @@ void *BMO_slot_buffer_get_single(BMOpSlot *slot) { BLI_assert(slot->slot_type == BMO_OP_SLOT_ELEMENT_BUF); BLI_assert(slot->slot_subtype.elem & BMO_OP_SLOT_SUBTYPE_ELEM_IS_SINGLE); - BLI_assert(slot->len == 0 || slot->len == 1); + BLI_assert(ELEM(slot->len, 0, 1)); return slot->len ? (BMHeader *)slot->data.buf[0] : NULL; } diff --git a/source/blender/bmesh/intern/bmesh_structure.c b/source/blender/bmesh/intern/bmesh_structure.c index d9f68f8aa62..ef4a9c9de1c 100644 --- a/source/blender/bmesh/intern/bmesh_structure.c +++ b/source/blender/bmesh/intern/bmesh_structure.c @@ -402,7 +402,7 @@ bool bmesh_radial_validate(int radlen, BMLoop *l) if (l_iter->e != l->e) { return false; } - if (l_iter->v != l->e->v1 && l_iter->v != l->e->v2) { + if (!ELEM(l_iter->v, l->e->v1, l->e->v2)) { return false; } diff --git a/source/blender/bmesh/intern/bmesh_walkers_impl.c b/source/blender/bmesh/intern/bmesh_walkers_impl.c index 8132230334b..7d56e560275 100644 --- a/source/blender/bmesh/intern/bmesh_walkers_impl.c +++ b/source/blender/bmesh/intern/bmesh_walkers_impl.c @@ -983,7 +983,7 @@ static void *bmw_EdgeLoopWalker_step(BMWalker *walker) /* Typical loopiong over edges in the middle of a mesh */ /* However, why use 2 here at all? * I guess for internal ngon loops it can be useful. Antony R. */ - if (vert_edge_tot == 4 || vert_edge_tot == 2) { + if (ELEM(vert_edge_tot, 4, 2)) { int i_opposite = vert_edge_tot / 2; int i = 0; do { |