diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-11-06 04:30:59 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-11-06 04:32:54 +0300 |
commit | aa3a4973a30ff668a62447e18ac41f6c916b4a8b (patch) | |
tree | 1b24cc55995ba8b3d72aaabd9400a3e1e030d540 /source/blender/bmesh/intern/bmesh_operators.c | |
parent | 7cb20d841da16d0bffb63154403267500e9941f5 (diff) |
Cleanup: use ELEM macro
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_operators.c')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_operators.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |