GPencil: Fix Windows compiler errors

For non trivial data must be used `MEM_new`
This commit is contained in:
Antonio Vazquez 2022-03-29 19:32:28 +02:00
parent 5596f79821
commit ac40d40cb7
2 changed files with 2 additions and 2 deletions

View File

@ -222,7 +222,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 = MEM_cnew<bGPDspoint>("gp_stroke_points");
gps_temp->points = MEM_new<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);

View File

@ -292,7 +292,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 = MEM_cnew<bGPDspoint>("gp_stroke_points");
gps_temp->points = MEM_new<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);