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/simulation | |
parent | 79012c67849985be677cf63e363781e1992840fa (diff) |
Cleanup: use new c++ guarded allocator API
API added in rBa3ad5abf2fe85d623f9e78fefc34e27bdc14632e
Diffstat (limited to 'source/blender/simulation')
-rw-r--r-- | source/blender/simulation/intern/SIM_mass_spring.cpp | 3 | ||||
-rw-r--r-- | source/blender/simulation/intern/hair_volume.cpp | 2 |
2 files changed, 2 insertions, 3 deletions
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<ClothSolverResult>("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<HairGrid>("hair grid"); grid->res[0] = res[0]; grid->res[1] = res[1]; grid->res[2] = res[2]; |