diff options
Diffstat (limited to 'source/blender/io')
-rw-r--r-- | source/blender/io/collada/AnimationImporter.cpp | 4 | ||||
-rw-r--r-- | source/blender/io/gpencil/intern/gpencil_io_export_pdf.cc | 2 | ||||
-rw-r--r-- | source/blender/io/gpencil/intern/gpencil_io_export_svg.cc | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/io/collada/AnimationImporter.cpp b/source/blender/io/collada/AnimationImporter.cpp index 870db4a15d3..49a4b22dbc3 100644 --- a/source/blender/io/collada/AnimationImporter.cpp +++ b/source/blender/io/collada/AnimationImporter.cpp @@ -237,7 +237,7 @@ void AnimationImporter::add_fcurves_to_object(Main *bmain, /* no matching groups, so add one */ if (grp == nullptr) { /* Add a new group, and make it active */ - grp = (bActionGroup *)MEM_callocN(sizeof(bActionGroup), "bActionGroup"); + grp = MEM_cnew<bActionGroup>("bActionGroup"); grp->flag = AGRP_SELECTED; BLI_strncpy(grp->name, bone_name, sizeof(grp->name)); @@ -2177,7 +2177,7 @@ void AnimationImporter::add_bone_fcurve(Object *ob, COLLADAFW::Node *node, FCurv /* no matching groups, so add one */ if (grp == nullptr) { /* Add a new group, and make it active */ - grp = (bActionGroup *)MEM_callocN(sizeof(bActionGroup), "bActionGroup"); + grp = MEM_cnew<bActionGroup>("bActionGroup"); grp->flag = AGRP_SELECTED; BLI_strncpy(grp->name, bone_name, sizeof(grp->name)); diff --git a/source/blender/io/gpencil/intern/gpencil_io_export_pdf.cc b/source/blender/io/gpencil/intern/gpencil_io_export_pdf.cc index 7539fba1343..c856e60c4b8 100644 --- a/source/blender/io/gpencil/intern/gpencil_io_export_pdf.cc +++ b/source/blender/io/gpencil/intern/gpencil_io_export_pdf.cc @@ -238,7 +238,7 @@ void GpencilExporterPDF::export_stroke_to_polyline(bGPDlayer *gpl, /* Get the thickness in pixels using a simple 1 point stroke. */ bGPDstroke *gps_temp = BKE_gpencil_stroke_duplicate(gps, false, false); gps_temp->totpoints = 1; - gps_temp->points = (bGPDspoint *)MEM_callocN(sizeof(bGPDspoint), "gp_stroke_points"); + gps_temp->points = MEM_cnew<bGPDspoint>("gp_stroke_points"); const bGPDspoint *pt_src = &gps->points[0]; bGPDspoint *pt_dst = &gps_temp->points[0]; copy_v3_v3(&pt_dst->x, &pt_src->x); diff --git a/source/blender/io/gpencil/intern/gpencil_io_export_svg.cc b/source/blender/io/gpencil/intern/gpencil_io_export_svg.cc index 09eac7a2813..3ca6ed6cd45 100644 --- a/source/blender/io/gpencil/intern/gpencil_io_export_svg.cc +++ b/source/blender/io/gpencil/intern/gpencil_io_export_svg.cc @@ -308,7 +308,7 @@ void GpencilExporterSVG::export_stroke_to_polyline(bGPDlayer *gpl, /* Get the thickness in pixels using a simple 1 point stroke. */ bGPDstroke *gps_temp = BKE_gpencil_stroke_duplicate(gps, false, false); gps_temp->totpoints = 1; - gps_temp->points = (bGPDspoint *)MEM_callocN(sizeof(bGPDspoint), "gp_stroke_points"); + gps_temp->points = MEM_cnew<bGPDspoint>("gp_stroke_points"); bGPDspoint *pt_src = &gps->points[0]; bGPDspoint *pt_dst = &gps_temp->points[0]; copy_v3_v3(&pt_dst->x, &pt_src->x); |