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:
@@ -118,22 +118,20 @@ static PyObject *bpy_app_handlers_persistent_new(PyTypeObject *UNUSED(type),
|
||||
"get the dictionary from the function passed");
|
||||
return NULL;
|
||||
}
|
||||
else {
|
||||
/* set id */
|
||||
if (*dict_ptr == NULL) {
|
||||
*dict_ptr = PyDict_New();
|
||||
}
|
||||
|
||||
PyDict_SetItemString(*dict_ptr, PERMINENT_CB_ID, Py_None);
|
||||
/* set id */
|
||||
if (*dict_ptr == NULL) {
|
||||
*dict_ptr = PyDict_New();
|
||||
}
|
||||
|
||||
PyDict_SetItemString(*dict_ptr, PERMINENT_CB_ID, Py_None);
|
||||
|
||||
Py_INCREF(value);
|
||||
return value;
|
||||
}
|
||||
else {
|
||||
PyErr_SetString(PyExc_ValueError, "bpy.app.handlers.persistent expected a function");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
PyErr_SetString(PyExc_ValueError, "bpy.app.handlers.persistent expected a function");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* dummy type because decorators can't be PyCFunctions */
|
||||
|
||||
Reference in New Issue
Block a user