Cleanup: Python, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/python` module. No functional changes.
This commit is contained in:
@@ -82,7 +82,7 @@ static int bpy_slot_from_py_elem_check(BPy_BMElem *value,
|
||||
Py_TYPE(value)->tp_name);
|
||||
return -1;
|
||||
}
|
||||
else if (value->bm == NULL) {
|
||||
if (value->bm == NULL) {
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"%.200s: keyword \"%.200s\" %.200s invalidated element",
|
||||
opname,
|
||||
@@ -90,7 +90,7 @@ static int bpy_slot_from_py_elem_check(BPy_BMElem *value,
|
||||
descr);
|
||||
return -1;
|
||||
}
|
||||
else if (value->bm != bm) { /* we may want to make this check optional by setting 'bm' to NULL */
|
||||
if (value->bm != bm) { /* we may want to make this check optional by setting 'bm' to NULL */
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"%.200s: keyword \"%.200s\" %.200s invalidated element",
|
||||
opname,
|
||||
@@ -127,7 +127,7 @@ static int bpy_slot_from_py_elemseq_check(BPy_BMGeneric *value,
|
||||
descr);
|
||||
return -1;
|
||||
}
|
||||
else if (value->bm != bm) { /* we may want to make this check optional by setting 'bm' to NULL */
|
||||
if (value->bm != bm) { /* we may want to make this check optional by setting 'bm' to NULL */
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"%.200s: keyword \"%.200s\" %.200s, invalidated sequence",
|
||||
opname,
|
||||
@@ -135,7 +135,7 @@ static int bpy_slot_from_py_elemseq_check(BPy_BMGeneric *value,
|
||||
descr);
|
||||
return -1;
|
||||
}
|
||||
else if ((htype_py & htype_bmo) == 0) {
|
||||
if ((htype_py & htype_bmo) == 0) {
|
||||
char str_bmo[32];
|
||||
char str_py[32];
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
@@ -175,9 +175,8 @@ static int bpy_slot_from_py(BMesh *bm,
|
||||
Py_TYPE(value)->tp_name);
|
||||
return -1;
|
||||
}
|
||||
else {
|
||||
BMO_SLOT_AS_BOOL(slot) = param;
|
||||
}
|
||||
|
||||
BMO_SLOT_AS_BOOL(slot) = param;
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -223,9 +222,8 @@ static int bpy_slot_from_py(BMesh *bm,
|
||||
Py_TYPE(value)->tp_name);
|
||||
return -1;
|
||||
}
|
||||
else {
|
||||
BMO_SLOT_AS_INT(slot) = param;
|
||||
}
|
||||
|
||||
BMO_SLOT_AS_INT(slot) = param;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -239,9 +237,9 @@ static int bpy_slot_from_py(BMesh *bm,
|
||||
Py_TYPE(value)->tp_name);
|
||||
return -1;
|
||||
}
|
||||
else {
|
||||
BMO_SLOT_AS_FLOAT(slot) = param;
|
||||
}
|
||||
|
||||
BMO_SLOT_AS_FLOAT(slot) = param;
|
||||
|
||||
break;
|
||||
}
|
||||
case BMO_OP_SLOT_MAT: {
|
||||
|
Reference in New Issue
Block a user