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:
Diffstat (limited to 'source/blender/modifiers/intern/MOD_screw.c')
-rw-r--r--source/blender/modifiers/intern/MOD_screw.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/modifiers/intern/MOD_screw.c b/source/blender/modifiers/intern/MOD_screw.c
index 010bf8bf092..979dc339e4e 100644
--- a/source/blender/modifiers/intern/MOD_screw.c
+++ b/source/blender/modifiers/intern/MOD_screw.c
@@ -139,7 +139,7 @@ static DerivedMesh *dm_remove_doubles_on_axis(
if (tot_doubles != 0) {
uint tot = totvert * step_tot;
- int *full_doubles_map = MEM_mallocN(sizeof(int) * tot, __func__);
+ int *full_doubles_map = MEM_malloc_arrayN(tot, sizeof(int), __func__);
copy_vn_i(full_doubles_map, (int)tot, -1);
uint tot_doubles_left = tot_doubles;
@@ -448,10 +448,10 @@ static DerivedMesh *applyModifier(ModifierData *md, const struct EvaluationConte
mpoly_orig = dm->getPolyArray(dm);
mloop_orig = dm->getLoopArray(dm);
- edge_poly_map = MEM_mallocN(sizeof(*edge_poly_map) * totedge, __func__);
+ edge_poly_map = MEM_malloc_arrayN(totedge, sizeof(*edge_poly_map), __func__);
memset(edge_poly_map, 0xff, sizeof(*edge_poly_map) * totedge);
- vert_loop_map = MEM_mallocN(sizeof(*vert_loop_map) * totvert, __func__);
+ vert_loop_map = MEM_malloc_arrayN(totvert, sizeof(*vert_loop_map), __func__);
memset(vert_loop_map, 0xff, sizeof(*vert_loop_map) * totvert);
for (i = 0, mp_orig = mpoly_orig; i < totpoly; i++, mp_orig++) {
@@ -497,7 +497,7 @@ static DerivedMesh *applyModifier(ModifierData *md, const struct EvaluationConte
* This makes the modifier faster with one less alloc.
*/
- vert_connect = MEM_mallocN(sizeof(ScrewVertConnect) * totvert, "ScrewVertConnect");
+ vert_connect = MEM_malloc_arrayN(totvert, sizeof(ScrewVertConnect), "ScrewVertConnect");
//vert_connect = (ScrewVertConnect *) &medge_new[totvert]; /* skip the first slice of verts */
vc = vert_connect;