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>2020-08-08 06:29:21 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-08-08 06:38:00 +0300
commit171e77c3c25a1224fc5f7db40ec6f8879f8dbbb0 (patch)
treeea51f4fa508a39807e6f6d333b2d53af8a2b9fc1 /source/blender/python
parent4bf3ca20165959f98c7c830a138ba2901d3dd851 (diff)
Cleanup: use array syntax for sizeof with fixed values
Also order sizeof(..) first to promote other values to size_t.
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/mathutils/mathutils_Vector.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c
index b30aafbf875..3ee6e766413 100644
--- a/source/blender/python/mathutils/mathutils_Vector.c
+++ b/source/blender/python/mathutils/mathutils_Vector.c
@@ -483,7 +483,7 @@ static PyObject *Vector_resize_2d(VectorObject *self)
return NULL;
}
- self->vec = PyMem_Realloc(self->vec, (sizeof(float) * 2));
+ self->vec = PyMem_Realloc(self->vec, sizeof(float[2]));
if (self->vec == NULL) {
PyErr_SetString(PyExc_MemoryError,
"Vector.resize_2d(): "
@@ -514,7 +514,7 @@ static PyObject *Vector_resize_3d(VectorObject *self)
return NULL;
}
- self->vec = PyMem_Realloc(self->vec, (sizeof(float) * 3));
+ self->vec = PyMem_Realloc(self->vec, sizeof(float[3]));
if (self->vec == NULL) {
PyErr_SetString(PyExc_MemoryError,
"Vector.resize_3d(): "
@@ -549,7 +549,7 @@ static PyObject *Vector_resize_4d(VectorObject *self)
return NULL;
}
- self->vec = PyMem_Realloc(self->vec, (sizeof(float) * 4));
+ self->vec = PyMem_Realloc(self->vec, sizeof(float[4]));
if (self->vec == NULL) {
PyErr_SetString(PyExc_MemoryError,
"Vector.resize_4d(): "