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/gpencil/gpencil_armature.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/gpencil/gpencil_armature.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_armature.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/gpencil/gpencil_armature.c b/source/blender/editors/gpencil/gpencil_armature.c index 962a74d9e6f..5cc5e7ecdcd 100644 --- a/source/blender/editors/gpencil/gpencil_armature.c +++ b/source/blender/editors/gpencil/gpencil_armature.c @@ -308,10 +308,10 @@ static void gpencil_add_verts_to_dgroups( /* create an array of root and tip positions transformed into * global coords */ - root = MEM_callocN(numbones * sizeof(float) * 3, "root"); - tip = MEM_callocN(numbones * sizeof(float) * 3, "tip"); - selected = MEM_callocN(numbones * sizeof(int), "selected"); - radsqr = MEM_callocN(numbones * sizeof(float), "radsqr"); + root = MEM_callocN(sizeof(float[3]) * numbones, "root"); + tip = MEM_callocN(sizeof(float[3]) * numbones, "tip"); + selected = MEM_callocN(sizeof(int) * numbones, "selected"); + radsqr = MEM_callocN(sizeof(float) * numbones, "radsqr"); for (j = 0; j < numbones; j++) { bone = bonelist[j]; |