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/sculpt_paint/paint_image_proj.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/sculpt_paint/paint_image_proj.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_proj.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index d16c66848b8..db7de01bee5 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -1383,7 +1383,7 @@ static void insert_seam_vert_array(const ProjPaintState *ps, const int fidx[2] = {fidx1, ((fidx1 + 1) % 3)}; float vec[2]; - VertSeam *vseam = BLI_memarena_alloc(arena, sizeof(VertSeam) * 2); + VertSeam *vseam = BLI_memarena_alloc(arena, sizeof(VertSeam[2])); vseam->prev = NULL; vseam->next = NULL; @@ -2785,10 +2785,10 @@ static void project_bucket_clip_face(const bool is_ortho, } if (flip) { - qsort(isectVCosSS, *tot, sizeof(float) * 3, float_z_sort_flip); + qsort(isectVCosSS, *tot, sizeof(float[3]), float_z_sort_flip); } else { - qsort(isectVCosSS, *tot, sizeof(float) * 3, float_z_sort); + qsort(isectVCosSS, *tot, sizeof(float[3]), float_z_sort); } doubles = true; @@ -3872,7 +3872,7 @@ static void proj_paint_state_cavity_init(ProjPaintState *ps) if (ps->do_mask_cavity) { int *counter = MEM_callocN(sizeof(int) * ps->totvert_eval, "counter"); - float(*edges)[3] = MEM_callocN(sizeof(float) * 3 * ps->totvert_eval, "edges"); + float(*edges)[3] = MEM_callocN(sizeof(float[3]) * ps->totvert_eval, "edges"); ps->cavities = MEM_mallocN(sizeof(float) * ps->totvert_eval, "ProjectPaint Cavities"); cavities = ps->cavities; |