Cleanup: Editors, Clang-Tidy else-after-return fixes

This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors` module.

No functional changes.
This commit is contained in:
2020-07-03 17:30:31 +02:00
parent 367034f210
commit 33a74941c5
40 changed files with 564 additions and 713 deletions

View File

@@ -2436,12 +2436,12 @@ static void adduplicateflagNurb(
/* actvert in cyclicu selection */
break;
}
else if (calc_duplicate_actvert(editnurb,
newnurb,
cu,
starta,
starta + newu,
cu->actvert - starta + b * newnu->pntsu)) {
if (calc_duplicate_actvert(editnurb,
newnurb,
cu,
starta,
starta + newu,
cu->actvert - starta + b * newnu->pntsu)) {
/* actvert in 'current' iteration selection */
break;
}
@@ -4544,15 +4544,13 @@ static int make_segment_exec(bContext *C, wmOperator *op)
if (nu_select_num > 1) {
break;
}
else {
/* only 1 selected, not first or last, a little complex, but intuitive */
if (nu->pntsv == 1) {
if ((nu->bp->f1 & SELECT) || (nu->bp[nu->pntsu - 1].f1 & SELECT)) {
/* pass */
}
else {
break;
}
/* only 1 selected, not first or last, a little complex, but intuitive */
if (nu->pntsv == 1) {
if ((nu->bp->f1 & SELECT) || (nu->bp[nu->pntsu - 1].f1 & SELECT)) {
/* pass */
}
else {
break;
}
}
}
@@ -5593,9 +5591,7 @@ static int add_vertex_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
else {
return OPERATOR_CANCELLED;
}
return OPERATOR_CANCELLED;
}
static int add_vertex_invoke(bContext *C, wmOperator *op, const wmEvent *event)
@@ -6517,9 +6513,7 @@ static int curve_delete_exec(bContext *C, wmOperator *op)
if (changed_multi) {
return OPERATOR_FINISHED;
}
else {
return OPERATOR_CANCELLED;
}
return OPERATOR_CANCELLED;
}
static const EnumPropertyItem curve_delete_type_items[] = {