diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-08-08 06:29:21 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-08-08 06:38:00 +0300 |
commit | 171e77c3c25a1224fc5f7db40ec6f8879f8dbbb0 (patch) | |
tree | ea51f4fa508a39807e6f6d333b2d53af8a2b9fc1 /source/blender/editors/armature/meshlaplacian.c | |
parent | 4bf3ca20165959f98c7c830a138ba2901d3dd851 (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/editors/armature/meshlaplacian.c')
-rw-r--r-- | source/blender/editors/armature/meshlaplacian.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c index 11066595e2e..75ffd31854a 100644 --- a/source/blender/editors/armature/meshlaplacian.c +++ b/source/blender/editors/armature/meshlaplacian.c @@ -223,7 +223,7 @@ static LaplacianSystem *laplacian_system_construct_begin(int totvert, int totfac sys->verts = MEM_callocN(sizeof(float *) * totvert, "LaplacianSystemVerts"); sys->vpinned = MEM_callocN(sizeof(char) * totvert, "LaplacianSystemVpinned"); - sys->faces = MEM_callocN(sizeof(int) * 3 * totface, "LaplacianSystemFaces"); + sys->faces = MEM_callocN(sizeof(int[3]) * totface, "LaplacianSystemFaces"); sys->totvert = 0; sys->totface = 0; @@ -296,7 +296,7 @@ static void laplacian_system_construct_end(LaplacianSystem *sys) } if (sys->storeweights) { - sys->fweights = MEM_callocN(sizeof(float) * 3 * totface, "LaplacianFWeight"); + sys->fweights = MEM_callocN(sizeof(float[3]) * totface, "LaplacianFWeight"); } for (a = 0, face = sys->faces; a < totface; a++, face++) { @@ -568,7 +568,7 @@ static void heat_calc_vnormals(LaplacianSystem *sys) float fnor[3]; int a, v1, v2, v3, (*face)[3]; - sys->heat.vnors = MEM_callocN(sizeof(float) * 3 * sys->totvert, "HeatVNors"); + sys->heat.vnors = MEM_callocN(sizeof(float[3]) * sys->totvert, "HeatVNors"); for (a = 0, face = sys->faces; a < sys->totface; a++, face++) { v1 = (*face)[0]; @@ -1762,7 +1762,7 @@ void ED_mesh_deform_bind_callback(MeshDeformModifierData *mmd, memset(&mdb, 0, sizeof(MeshDeformBind)); /* get mesh and cage mesh */ - mdb.vertexcos = MEM_callocN(sizeof(float) * 3 * totvert, "MeshDeformCos"); + mdb.vertexcos = MEM_callocN(sizeof(float[3]) * totvert, "MeshDeformCos"); mdb.totvert = totvert; mdb.cagemesh = cagemesh; |