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>2021-10-14 02:17:33 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-10-14 05:00:24 +0300
commit576142dc85c78ced792e3440a7665ea57e45a0cc (patch)
tree4b37d4897683f23a4f42ea476751cf9ed732e4de /source/blender/editors/sculpt_paint/sculpt_expand.c
parentc6e956bbb148b80cbe03d59198f8257062434cff (diff)
Cleanup: pass the sizeof(..) as the second arg for array allocation
By argument naming and convention this is the intended argument order.
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_expand.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_expand.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_expand.c b/source/blender/editors/sculpt_paint/sculpt_expand.c
index 40874375772..2ba03969f38 100644
--- a/source/blender/editors/sculpt_paint/sculpt_expand.c
+++ b/source/blender/editors/sculpt_paint/sculpt_expand.c
@@ -465,7 +465,7 @@ static float *sculpt_expand_topology_falloff_create(Sculpt *sd, Object *ob, cons
{
SculptSession *ss = ob->sculpt;
const int totvert = SCULPT_vertex_count_get(ss);
- float *dists = MEM_calloc_arrayN(sizeof(float), totvert, "topology dist");
+ float *dists = MEM_calloc_arrayN(totvert, sizeof(float), "topology dist");
SculptFloodFill flood;
SCULPT_floodfill_init(ss, &flood);
@@ -515,7 +515,7 @@ static float *sculpt_expand_normal_falloff_create(Sculpt *sd,
{
SculptSession *ss = ob->sculpt;
const int totvert = SCULPT_vertex_count_get(ss);
- float *dists = MEM_malloc_arrayN(sizeof(float), totvert, "normal dist");
+ float *dists = MEM_malloc_arrayN(totvert, sizeof(float), "normal dist");
float *edge_factor = MEM_callocN(sizeof(float) * totvert, "mask edge factor");
for (int i = 0; i < totvert; i++) {
edge_factor[i] = 1.0f;
@@ -560,7 +560,7 @@ static float *sculpt_expand_spherical_falloff_create(Object *ob, const int v)
SculptSession *ss = ob->sculpt;
const int totvert = SCULPT_vertex_count_get(ss);
- float *dists = MEM_malloc_arrayN(sizeof(float), totvert, "spherical dist");
+ float *dists = MEM_malloc_arrayN(totvert, sizeof(float), "spherical dist");
for (int i = 0; i < totvert; i++) {
dists[i] = FLT_MAX;
}
@@ -591,7 +591,7 @@ static float *sculpt_expand_boundary_topology_falloff_create(Object *ob, const i
{
SculptSession *ss = ob->sculpt;
const int totvert = SCULPT_vertex_count_get(ss);
- float *dists = MEM_calloc_arrayN(sizeof(float), totvert, "spherical dist");
+ float *dists = MEM_calloc_arrayN(totvert, sizeof(float), "spherical dist");
BLI_bitmap *visited_vertices = BLI_BITMAP_NEW(totvert, "visited vertices");
GSQueue *queue = BLI_gsqueue_new(sizeof(int));
@@ -652,7 +652,7 @@ static float *sculpt_expand_diagonals_falloff_create(Object *ob, const int v)
{
SculptSession *ss = ob->sculpt;
const int totvert = SCULPT_vertex_count_get(ss);
- float *dists = MEM_calloc_arrayN(sizeof(float), totvert, "spherical dist");
+ float *dists = MEM_calloc_arrayN(totvert, sizeof(float), "spherical dist");
/* This algorithm uses mesh data (polys and loops), so this falloff type can't be initialized for
* Multires. It also does not make sense to implement it for dyntopo as the result will be the
@@ -863,7 +863,7 @@ static void sculpt_expand_topology_from_state_boundary(Object *ob,
SculptSession *ss = ob->sculpt;
const int totvert = SCULPT_vertex_count_get(ss);
- float *dists = MEM_calloc_arrayN(sizeof(float), totvert, "topology dist");
+ float *dists = MEM_calloc_arrayN(totvert, sizeof(float), "topology dist");
BLI_bitmap *boundary_vertices = sculpt_expand_boundary_from_enabled(ss, enabled_vertices, false);
SculptFloodFill flood;