Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-11-06 04:30:59 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-11-06 04:32:54 +0300
commitaa3a4973a30ff668a62447e18ac41f6c916b4a8b (patch)
tree1b24cc55995ba8b3d72aaabd9400a3e1e030d540 /source/blender/editors/mesh
parent7cb20d841da16d0bffb63154403267500e9941f5 (diff)
Cleanup: use ELEM macro
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r--source/blender/editors/mesh/editmesh_preselect_edgering.c2
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c4
-rw-r--r--source/blender/editors/mesh/meshtools.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/mesh/editmesh_preselect_edgering.c b/source/blender/editors/mesh/editmesh_preselect_edgering.c
index aa1df3d76fc..43e36957dc9 100644
--- a/source/blender/editors/mesh/editmesh_preselect_edgering.c
+++ b/source/blender/editors/mesh/editmesh_preselect_edgering.c
@@ -110,7 +110,7 @@ static void edgering_find_order(BMEdge *eed_last, BMEdge *eed, BMVert *eve_last,
BMLoop *l_other = BM_loop_other_edge_loop(l, eed->v1);
const bool rev = (l_other == l->prev);
- while (l_other->v != eed_last->v1 && l_other->v != eed_last->v2) {
+ while (!ELEM(l_other->v, eed_last->v1, eed_last->v2)) {
l_other = rev ? l_other->prev : l_other->next;
}
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 85cc19e7471..c8367c720a7 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -875,7 +875,7 @@ static void edbm_add_edge_face_exec__tricky_finalize_sel(BMesh *bm, BMElem *ele_
}
else {
BMLoop *l = BM_face_edge_share_loop(f, (BMEdge *)ele_desel);
- BLI_assert(f->len == 4 || f->len == 3);
+ BLI_assert(ELEM(f->len, 4, 3));
BM_edge_select_set(bm, (BMEdge *)ele_desel, false);
if (f->len == 4) {
@@ -4082,7 +4082,7 @@ static int edbm_knife_cut_exec(bContext *C, wmOperator *op)
isect = bm_edge_seg_isect(sco_a, sco_b, mouse_path, len, mode, &isected);
if (isect != 0.0f) {
- if (mode != KNIFE_MULTICUT && mode != KNIFE_MIDPOINT) {
+ if (!ELEM(mode, KNIFE_MULTICUT, KNIFE_MIDPOINT)) {
BMO_slot_map_float_insert(&bmop, slot_edge_percents, be, isect);
}
}
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index 62dd4a22654..3b5897de0b0 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -407,7 +407,7 @@ int ED_mesh_join_objects_exec(bContext *C, wmOperator *op)
me = (Mesh *)ob->data;
key = me->key;
- if (totvert == 0 || totvert == me->totvert) {
+ if (ELEM(totvert, 0, me->totvert)) {
BKE_report(op->reports, RPT_WARNING, "No mesh data to join");
return OPERATOR_CANCELLED;
}