diff options
Diffstat (limited to 'source/blender/python/bmesh/bmesh_py_ops_call.c')
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_ops_call.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_ops_call.c b/source/blender/python/bmesh/bmesh_py_ops_call.c index b1e5c1c761b..a387ba31c84 100644 --- a/source/blender/python/bmesh/bmesh_py_ops_call.c +++ b/source/blender/python/bmesh/bmesh_py_ops_call.c @@ -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: { |