diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-03-04 23:54:52 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-03-04 23:59:34 +0300 |
commit | a297a6c444c7463295f0447a55a5f9542414529c (patch) | |
tree | 964875831032df99b2625c4748992c70ddb7231f /source/blender/editors/mesh | |
parent | a5c4a44df67ed69844a433179629d861cf10f438 (diff) |
Cleanup: replace unnecessary MEM_callocN calls
Use MEM_mallocN when memory is immediately copied over.
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/meshtools.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index 832e2a94488..08d7ee4d67c 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -430,7 +430,7 @@ int join_mesh_exec(bContext *C, wmOperator *op) for (dg = ob_iter->defbase.first; dg; dg = dg->next) { /* See if this group exists in the object (if it doesn't, add it to the end) */ if (!defgroup_find_name(ob, dg->name)) { - odg = MEM_callocN(sizeof(bDeformGroup), "join deformGroup"); + odg = MEM_mallocN(sizeof(bDeformGroup), "join deformGroup"); memcpy(odg, dg, sizeof(bDeformGroup)); BLI_addtail(&ob->defbase, odg); } @@ -443,7 +443,7 @@ int join_mesh_exec(bContext *C, wmOperator *op) for (bFaceMap *fmap = ob_iter->fmaps.first; fmap; fmap = fmap->next) { /* See if this group exists in the object (if it doesn't, add it to the end) */ if (BKE_object_facemap_find_name(ob, fmap->name) == NULL) { - bFaceMap *fmap_new = MEM_callocN(sizeof(bFaceMap), "join faceMap"); + bFaceMap *fmap_new = MEM_mallocN(sizeof(bFaceMap), "join faceMap"); memcpy(fmap_new, fmap, sizeof(bFaceMap)); BLI_addtail(&ob->fmaps, fmap_new); } |