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-05-31 15:51:19 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-05-31 15:55:15 +0300
commitd8dbd49a2f23b7637f05fc058f39bdf6ab706624 (patch)
tree0805b9372c82ae6505d87e879824efe1d3e32f8e /source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp
parent8987f7987d8160e1f6e79e8c85d6ce65b885ab25 (diff)
Cleanup: style, use braces in source/
Automated using clang-tidy.
Diffstat (limited to 'source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp')
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp
index 6b12136693f..6a27fc6e140 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp
@@ -35,16 +35,19 @@ extern "C" {
int UnaryFunction0DVec3f_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&UnaryFunction0DVec3f_Type) < 0)
+ if (PyType_Ready(&UnaryFunction0DVec3f_Type) < 0) {
return -1;
+ }
Py_INCREF(&UnaryFunction0DVec3f_Type);
PyModule_AddObject(module, "UnaryFunction0DVec3f", (PyObject *)&UnaryFunction0DVec3f_Type);
- if (PyType_Ready(&VertexOrientation3DF0D_Type) < 0)
+ if (PyType_Ready(&VertexOrientation3DF0D_Type) < 0) {
return -1;
+ }
Py_INCREF(&VertexOrientation3DF0D_Type);
PyModule_AddObject(module, "VertexOrientation3DF0D", (PyObject *)&VertexOrientation3DF0D_Type);
@@ -69,8 +72,9 @@ static int UnaryFunction0DVec3f___init__(BPy_UnaryFunction0DVec3f *self,
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
+ }
self->uf0D_vec3f = new UnaryFunction0D<Vec3f>();
self->uf0D_vec3f->py_uf0D = (PyObject *)self;
return 0;
@@ -78,8 +82,9 @@ static int UnaryFunction0DVec3f___init__(BPy_UnaryFunction0DVec3f *self,
static void UnaryFunction0DVec3f___dealloc__(BPy_UnaryFunction0DVec3f *self)
{
- if (self->uf0D_vec3f)
+ if (self->uf0D_vec3f) {
delete self->uf0D_vec3f;
+ }
UnaryFunction0D_Type.tp_dealloc((PyObject *)self);
}
@@ -96,8 +101,9 @@ static PyObject *UnaryFunction0DVec3f___call__(BPy_UnaryFunction0DVec3f *self,
PyObject *obj;
if (!PyArg_ParseTupleAndKeywords(
- args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj))
+ args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj)) {
return NULL;
+ }
if (typeid(*(self->uf0D_vec3f)) == typeid(UnaryFunction0D<Vec3f>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");