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-03-04 23:54:52 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-03-04 23:59:34 +0300
commita297a6c444c7463295f0447a55a5f9542414529c (patch)
tree964875831032df99b2625c4748992c70ddb7231f /source/blender/editors/gpencil/gpencil_edit.c
parenta5c4a44df67ed69844a433179629d861cf10f438 (diff)
Cleanup: replace unnecessary MEM_callocN calls
Use MEM_mallocN when memory is immediately copied over.
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_edit.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_edit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index ee4a26475b9..1931f35922a 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -677,12 +677,12 @@ static void gp_duplicate_points(const bGPDstroke *gps,
gpsd->tot_triangles = 0;
/* now, make a new points array, and copy of the relevant parts */
- gpsd->points = MEM_callocN(sizeof(bGPDspoint) * len, "gps stroke points copy");
+ gpsd->points = MEM_mallocN(sizeof(bGPDspoint) * len, "gps stroke points copy");
memcpy(gpsd->points, gps->points + start_idx, sizeof(bGPDspoint) * len);
gpsd->totpoints = len;
if (gps->dvert != NULL) {
- gpsd->dvert = MEM_callocN(sizeof(MDeformVert) * len, "gps stroke weights copy");
+ gpsd->dvert = MEM_mallocN(sizeof(MDeformVert) * len, "gps stroke weights copy");
memcpy(gpsd->dvert, gps->dvert + start_idx, sizeof(MDeformVert) * len);
/* Copy weights */