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/blenkernel/intern/dynamicpaint.c
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/blenkernel/intern/dynamicpaint.c')
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index a39f2ccb6d8..1c61afe5e5a 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -5166,7 +5166,7 @@ static int dynamicPaint_prepareEffectStep(struct Depsgraph *depsgraph,
ListBase *effectors = BKE_effectors_create(depsgraph, ob, NULL, surface->effector_weights);
/* allocate memory for force data (dir vector + strength) */
- *force = MEM_mallocN(sData->total_points * 4 * sizeof(float), "PaintEffectForces");
+ *force = MEM_mallocN(sizeof(float[4]) * sData->total_points, "PaintEffectForces");
if (*force) {
DynamicPaintEffectData data = {
@@ -6260,7 +6260,7 @@ static int dynamicPaint_doStep(Depsgraph *depsgraph,
/* calculate brush speed vectors if required */
if (surface->type == MOD_DPAINT_SURFACE_T_PAINT && brush->flags & MOD_DPAINT_DO_SMUDGE) {
- bData->brush_velocity = MEM_callocN(sData->total_points * sizeof(float) * 4,
+ bData->brush_velocity = MEM_callocN(sizeof(float[4]) * sData->total_points,
"Dynamic Paint brush velocity");
/* init adjacency data if not already */
if (!sData->adj_data) {