diff options
author | Aaron Carlisle <carlisle.b3d@gmail.com> | 2021-12-25 06:17:49 +0300 |
---|---|---|
committer | Aaron Carlisle <carlisle.b3d@gmail.com> | 2021-12-25 06:18:04 +0300 |
commit | 6e0cf86e73fedebb1615dde664fbac4859a72b60 (patch) | |
tree | d60e9f5c90cb3e4017b89499b82b3b117817125b /source/blender/blenkernel/intern/curve.cc | |
parent | 79012c67849985be677cf63e363781e1992840fa (diff) |
Cleanup: use new c++ guarded allocator API
API added in rBa3ad5abf2fe85d623f9e78fefc34e27bdc14632e
Diffstat (limited to 'source/blender/blenkernel/intern/curve.cc')
-rw-r--r-- | source/blender/blenkernel/intern/curve.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/curve.cc b/source/blender/blenkernel/intern/curve.cc index dc2527f9b62..291927ee398 100644 --- a/source/blender/blenkernel/intern/curve.cc +++ b/source/blender/blenkernel/intern/curve.cc @@ -2694,7 +2694,7 @@ void BKE_curve_bevelList_make(Object *ob, const ListBase *nurbs, const bool for_ if (nu->type == CU_POLY) { len = nu->pntsu; - BevList *bl = (BevList *)MEM_callocN(sizeof(BevList), __func__); + BevList *bl = MEM_cnew<BevList>(__func__); bl->bevpoints = (BevPoint *)MEM_calloc_arrayN(len, sizeof(BevPoint), __func__); if (need_seglen && (nu->flagu & CU_NURB_CYCLIC) == 0) { bl->seglen = (float *)MEM_malloc_arrayN(segcount, sizeof(float), __func__); @@ -2744,7 +2744,7 @@ void BKE_curve_bevelList_make(Object *ob, const ListBase *nurbs, const bool for_ /* in case last point is not cyclic */ len = segcount * resolu + 1; - BevList *bl = (BevList *)MEM_callocN(sizeof(BevList), __func__); + BevList *bl = MEM_cnew<BevList>(__func__); bl->bevpoints = (BevPoint *)MEM_calloc_arrayN(len, sizeof(BevPoint), __func__); if (need_seglen && (nu->flagu & CU_NURB_CYCLIC) == 0) { bl->seglen = (float *)MEM_malloc_arrayN(segcount, sizeof(float), __func__); @@ -2880,7 +2880,7 @@ void BKE_curve_bevelList_make(Object *ob, const ListBase *nurbs, const bool for_ if (nu->pntsv == 1) { len = (resolu * segcount); - BevList *bl = (BevList *)MEM_callocN(sizeof(BevList), __func__); + BevList *bl = MEM_cnew<BevList>(__func__); bl->bevpoints = (BevPoint *)MEM_calloc_arrayN(len, sizeof(BevPoint), __func__); if (need_seglen && (nu->flagu & CU_NURB_CYCLIC) == 0) { bl->seglen = (float *)MEM_malloc_arrayN(segcount, sizeof(float), __func__); |