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 <campbell@blender.org>2022-09-25 10:04:52 +0300
committerCampbell Barton <campbell@blender.org>2022-09-25 11:26:27 +0300
commit891949cbb47143420f4324cb60efc05ef5d70b39 (patch)
treefe70a45612ae96f9ce1f37378ef5ff035d3127f5 /source/blender/freestyle/intern/python/UnaryFunction0D
parentc9e35c2ced92082c86f1ecb9ecd16c6230218c7c (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')
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp4
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp4
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp2
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)) {