Mesh: PR6497 move return statement to new line

This commit is contained in:
Chris Hennes
2022-03-29 12:36:30 -05:00
parent a9c33d8f58
commit 3ecd16e0bd
21 changed files with 131 additions and 63 deletions

View File

@@ -72,7 +72,8 @@ int MeshPy::PyInit(PyObject* args, PyObject*)
try {
this->parentProperty = nullptr;
// if no mesh is given
if (!pcObj) return 0;
if (!pcObj)
return 0;
if (PyObject_TypeCheck(pcObj, &(MeshPy::Type))) {
getMeshObjectPtr()->operator = (*static_cast<MeshPy*>(pcObj)->getMeshObjectPtr());
}
@@ -80,13 +81,15 @@ int MeshPy::PyInit(PyObject* args, PyObject*)
PyObject* ret = addFacets(args);
bool ok = (ret!=nullptr);
Py_XDECREF(ret);
if (!ok) return -1;
if (!ok)
return -1;
}
else if (PyTuple_Check(pcObj)) {
PyObject* ret = addFacets(args);
bool ok = (ret!=nullptr);
Py_XDECREF(ret);
if (!ok) return -1;
if (!ok)
return -1;
}
else if (PyUnicode_Check(pcObj)) {
getMeshObjectPtr()->load(PyUnicode_AsUTF8(pcObj));