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:
authorCampbell Barton <ideasman42@gmail.com>2019-03-29 22:12:48 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-29 23:14:28 +0300
commit25ec4b437fe927205a810470cdc23efd7282c85b (patch)
tree6d7ba2fe73703915b4b94d3f2dab03fb731e9544 /source/blender/python/mathutils/mathutils_kdtree.c
parent18d06e8d21ed8c9a19df4205abcd7ed17eb9af00 (diff)
Cleanup: style, use braces for the Python API
Diffstat (limited to 'source/blender/python/mathutils/mathutils_kdtree.c')
-rw-r--r--source/blender/python/mathutils/mathutils_kdtree.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/python/mathutils/mathutils_kdtree.c b/source/blender/python/mathutils/mathutils_kdtree.c
index f9cc99551bb..7228ac41bd6 100644
--- a/source/blender/python/mathutils/mathutils_kdtree.c
+++ b/source/blender/python/mathutils/mathutils_kdtree.c
@@ -148,8 +148,9 @@ static PyObject *py_kdtree_insert(PyKDTree *self, PyObject *args, PyObject *kwar
return NULL;
}
- if (mathutils_array_parse(co, 3, 3, py_co, "insert: invalid 'co' arg") == -1)
+ if (mathutils_array_parse(co, 3, 3, py_co, "insert: invalid 'co' arg") == -1) {
return NULL;
+ }
if (index < 0) {
PyErr_SetString(PyExc_ValueError, "negative index given");
@@ -238,8 +239,9 @@ static PyObject *py_kdtree_find(PyKDTree *self, PyObject *args, PyObject *kwargs
return NULL;
}
- if (mathutils_array_parse(co, 3, 3, py_co, "find: invalid 'co' arg") == -1)
+ if (mathutils_array_parse(co, 3, 3, py_co, "find: invalid 'co' arg") == -1) {
return NULL;
+ }
if (self->count != self->count_balance) {
PyErr_SetString(PyExc_RuntimeError, "KDTree must be balanced before calling find()");
@@ -299,8 +301,9 @@ static PyObject *py_kdtree_find_n(PyKDTree *self, PyObject *args, PyObject *kwar
return NULL;
}
- if (mathutils_array_parse(co, 3, 3, py_co, "find_n: invalid 'co' arg") == -1)
+ if (mathutils_array_parse(co, 3, 3, py_co, "find_n: invalid 'co' arg") == -1) {
return NULL;
+ }
if (UINT_IS_NEG(n)) {
PyErr_SetString(PyExc_RuntimeError, "negative 'n' given");
@@ -357,8 +360,9 @@ static PyObject *py_kdtree_find_range(PyKDTree *self, PyObject *args, PyObject *
return NULL;
}
- if (mathutils_array_parse(co, 3, 3, py_co, "find_range: invalid 'co' arg") == -1)
+ if (mathutils_array_parse(co, 3, 3, py_co, "find_range: invalid 'co' arg") == -1) {
return NULL;
+ }
if (radius < 0.0f) {
PyErr_SetString(PyExc_RuntimeError, "negative radius given");