diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-25 10:04:52 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-25 11:26:27 +0300 |
commit | 891949cbb47143420f4324cb60efc05ef5d70b39 (patch) | |
tree | fe70a45612ae96f9ce1f37378ef5ff035d3127f5 /source/blender/freestyle/intern/python/UnaryFunction0D | |
parent | c9e35c2ced92082c86f1ecb9ecd16c6230218c7c (diff) |
Cleanup: use 'u' prefixed integer types for brevity & cast style
To use function style cast '(unsigned char)x' can't be replaced by
'unsigned char(x)'.
Diffstat (limited to 'source/blender/freestyle/intern/python/UnaryFunction0D')
3 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp index be1b9f42ce4..29e1a1d3525 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp @@ -64,7 +64,7 @@ static int UnaryFunction0DUnsigned___init__(BPy_UnaryFunction0DUnsigned *self, if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) { return -1; } - self->uf0D_unsigned = new UnaryFunction0D<unsigned int>(); + self->uf0D_unsigned = new UnaryFunction0D<uint>(); self->uf0D_unsigned->py_uf0D = (PyObject *)self; return 0; } @@ -93,7 +93,7 @@ static PyObject *UnaryFunction0DUnsigned___call__(BPy_UnaryFunction0DUnsigned *s return nullptr; } - if (typeid(*(self->uf0D_unsigned)) == typeid(UnaryFunction0D<unsigned int>)) { + if (typeid(*(self->uf0D_unsigned)) == typeid(UnaryFunction0D<uint>)) { PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden"); return nullptr; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp index 6d17f6debdf..e0aa5af2adb 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp @@ -106,9 +106,9 @@ static PyObject *UnaryFunction0DVectorViewShape___call__(BPy_UnaryFunction0DVect return nullptr; } - const unsigned int list_len = self->uf0D_vectorviewshape->result.size(); + const uint list_len = self->uf0D_vectorviewshape->result.size(); PyObject *list = PyList_New(list_len); - for (unsigned int i = 0; i < list_len; i++) { + for (uint i = 0; i < list_len; i++) { ViewShape *v = self->uf0D_vectorviewshape->result[i]; PyList_SET_ITEM(list, i, v ? BPy_ViewShape_from_ViewShape(*v) : (Py_INCREF(Py_None), Py_None)); } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp index f0435ea1294..3a2c9868014 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp @@ -47,7 +47,7 @@ static int ReadSteerableViewMapPixelF0D___init__(BPy_ReadSteerableViewMapPixelF0 PyObject *kwds) { static const char *kwlist[] = {"orientation", "level", nullptr}; - unsigned int u; + uint u; int i; if (!PyArg_ParseTupleAndKeywords(args, kwds, "Ii", (char **)kwlist, &u, &i)) { |