Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2020-08-07 13:39:05 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-08-07 14:38:06 +0300
commit326e137a8cfaac6587a83d4c61d2889832926827 (patch)
tree07f7e924eec6372fe9e9b24481f420b20777fa13 /source/blender/freestyle/intern/python/BPy_IntegrationType.cpp
parent94eaaf097c3af408cdf84bb38aa295d01a84a741 (diff)
Cleanup: Freestyle, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/freestyle` module. No functional changes.
Diffstat (limited to 'source/blender/freestyle/intern/python/BPy_IntegrationType.cpp')
-rw-r--r--source/blender/freestyle/intern/python/BPy_IntegrationType.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp b/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp
index 98b0099bcad..9c155db913c 100644
--- a/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp
+++ b/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp
@@ -88,21 +88,20 @@ static PyObject *Integrator_integrate(PyObject * /*self*/, PyObject *args, PyObj
double res = integrate(*fun, it, it_end, t);
return PyFloat_FromDouble(res);
}
- else if (BPy_UnaryFunction0DFloat_Check(obj1)) {
+ if (BPy_UnaryFunction0DFloat_Check(obj1)) {
UnaryFunction0D<float> *fun = ((BPy_UnaryFunction0DFloat *)obj1)->uf0D_float;
float res = integrate(*fun, it, it_end, t);
return PyFloat_FromDouble(res);
}
- else if (BPy_UnaryFunction0DUnsigned_Check(obj1)) {
+ if (BPy_UnaryFunction0DUnsigned_Check(obj1)) {
UnaryFunction0D<unsigned int> *fun = ((BPy_UnaryFunction0DUnsigned *)obj1)->uf0D_unsigned;
unsigned int res = integrate(*fun, it, it_end, t);
return PyLong_FromLong(res);
}
- else {
- string class_name(Py_TYPE(obj1)->tp_name);
- PyErr_SetString(PyExc_TypeError, ("unsupported function type: " + class_name).c_str());
- return NULL;
- }
+
+ string class_name(Py_TYPE(obj1)->tp_name);
+ PyErr_SetString(PyExc_TypeError, ("unsupported function type: " + class_name).c_str());
+ return NULL;
}
/*-----------------------Integrator module docstring---------------------------------------*/