diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-05-31 15:51:19 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-05-31 15:55:15 +0300 |
commit | d8dbd49a2f23b7637f05fc058f39bdf6ab706624 (patch) | |
tree | 0805b9372c82ae6505d87e879824efe1d3e32f8e /source/blender/freestyle/intern/python/BPy_Iterator.cpp | |
parent | 8987f7987d8160e1f6e79e8c85d6ce65b885ab25 (diff) |
Cleanup: style, use braces in source/
Automated using clang-tidy.
Diffstat (limited to 'source/blender/freestyle/intern/python/BPy_Iterator.cpp')
-rw-r--r-- | source/blender/freestyle/intern/python/BPy_Iterator.cpp | 42 |
1 files changed, 28 insertions, 14 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_Iterator.cpp b/source/blender/freestyle/intern/python/BPy_Iterator.cpp index dfeaf9ac328..10417c07f33 100644 --- a/source/blender/freestyle/intern/python/BPy_Iterator.cpp +++ b/source/blender/freestyle/intern/python/BPy_Iterator.cpp @@ -41,62 +41,74 @@ extern "C" { //-------------------MODULE INITIALIZATION-------------------------------- int Iterator_Init(PyObject *module) { - if (module == NULL) + if (module == NULL) { return -1; + } - if (PyType_Ready(&Iterator_Type) < 0) + if (PyType_Ready(&Iterator_Type) < 0) { return -1; + } Py_INCREF(&Iterator_Type); PyModule_AddObject(module, "Iterator", (PyObject *)&Iterator_Type); - if (PyType_Ready(&AdjacencyIterator_Type) < 0) + if (PyType_Ready(&AdjacencyIterator_Type) < 0) { return -1; + } Py_INCREF(&AdjacencyIterator_Type); PyModule_AddObject(module, "AdjacencyIterator", (PyObject *)&AdjacencyIterator_Type); - if (PyType_Ready(&Interface0DIterator_Type) < 0) + if (PyType_Ready(&Interface0DIterator_Type) < 0) { return -1; + } Py_INCREF(&Interface0DIterator_Type); PyModule_AddObject(module, "Interface0DIterator", (PyObject *)&Interface0DIterator_Type); - if (PyType_Ready(&CurvePointIterator_Type) < 0) + if (PyType_Ready(&CurvePointIterator_Type) < 0) { return -1; + } Py_INCREF(&CurvePointIterator_Type); PyModule_AddObject(module, "CurvePointIterator", (PyObject *)&CurvePointIterator_Type); - if (PyType_Ready(&StrokeVertexIterator_Type) < 0) + if (PyType_Ready(&StrokeVertexIterator_Type) < 0) { return -1; + } Py_INCREF(&StrokeVertexIterator_Type); PyModule_AddObject(module, "StrokeVertexIterator", (PyObject *)&StrokeVertexIterator_Type); - if (PyType_Ready(&SVertexIterator_Type) < 0) + if (PyType_Ready(&SVertexIterator_Type) < 0) { return -1; + } Py_INCREF(&SVertexIterator_Type); PyModule_AddObject(module, "SVertexIterator", (PyObject *)&SVertexIterator_Type); - if (PyType_Ready(&orientedViewEdgeIterator_Type) < 0) + if (PyType_Ready(&orientedViewEdgeIterator_Type) < 0) { return -1; + } Py_INCREF(&orientedViewEdgeIterator_Type); PyModule_AddObject( module, "orientedViewEdgeIterator", (PyObject *)&orientedViewEdgeIterator_Type); - if (PyType_Ready(&ViewEdgeIterator_Type) < 0) + if (PyType_Ready(&ViewEdgeIterator_Type) < 0) { return -1; + } Py_INCREF(&ViewEdgeIterator_Type); PyModule_AddObject(module, "ViewEdgeIterator", (PyObject *)&ViewEdgeIterator_Type); - if (PyType_Ready(&ChainingIterator_Type) < 0) + if (PyType_Ready(&ChainingIterator_Type) < 0) { return -1; + } Py_INCREF(&ChainingIterator_Type); PyModule_AddObject(module, "ChainingIterator", (PyObject *)&ChainingIterator_Type); - if (PyType_Ready(&ChainPredicateIterator_Type) < 0) + if (PyType_Ready(&ChainPredicateIterator_Type) < 0) { return -1; + } Py_INCREF(&ChainPredicateIterator_Type); PyModule_AddObject(module, "ChainPredicateIterator", (PyObject *)&ChainPredicateIterator_Type); - if (PyType_Ready(&ChainSilhouetteIterator_Type) < 0) + if (PyType_Ready(&ChainSilhouetteIterator_Type) < 0) { return -1; + } Py_INCREF(&ChainSilhouetteIterator_Type); PyModule_AddObject(module, "ChainSilhouetteIterator", (PyObject *)&ChainSilhouetteIterator_Type); @@ -116,16 +128,18 @@ static int Iterator_init(BPy_Iterator *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; - if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) + if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) { return -1; + } self->it = new Iterator(); return 0; } static void Iterator_dealloc(BPy_Iterator *self) { - if (self->it) + if (self->it) { delete self->it; + } Py_TYPE(self)->tp_free((PyObject *)self); } |