From 6e0cf86e73fedebb1615dde664fbac4859a72b60 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Fri, 24 Dec 2021 22:17:49 -0500 Subject: Cleanup: use new c++ guarded allocator API API added in rBa3ad5abf2fe85d623f9e78fefc34e27bdc14632e --- source/blender/simulation/intern/SIM_mass_spring.cpp | 3 +-- source/blender/simulation/intern/hair_volume.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'source/blender/simulation/intern') diff --git a/source/blender/simulation/intern/SIM_mass_spring.cpp b/source/blender/simulation/intern/SIM_mass_spring.cpp index f9a22276363..36513690584 100644 --- a/source/blender/simulation/intern/SIM_mass_spring.cpp +++ b/source/blender/simulation/intern/SIM_mass_spring.cpp @@ -1295,8 +1295,7 @@ int SIM_cloth_solve( BKE_sim_debug_data_clear_category("collision"); if (!clmd->solver_result) { - clmd->solver_result = (ClothSolverResult *)MEM_callocN(sizeof(ClothSolverResult), - "cloth solver result"); + clmd->solver_result = MEM_cnew("cloth solver result"); } cloth_clear_result(clmd); diff --git a/source/blender/simulation/intern/hair_volume.cpp b/source/blender/simulation/intern/hair_volume.cpp index e47593eda05..d4550eec5d6 100644 --- a/source/blender/simulation/intern/hair_volume.cpp +++ b/source/blender/simulation/intern/hair_volume.cpp @@ -1160,7 +1160,7 @@ HairGrid *SIM_hair_volume_create_vertex_grid(float cellsize, } size = hair_grid_size(res); - grid = (HairGrid *)MEM_callocN(sizeof(HairGrid), "hair grid"); + grid = MEM_cnew("hair grid"); grid->res[0] = res[0]; grid->res[1] = res[1]; grid->res[2] = res[2]; -- cgit v1.2.3