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/blenlib/tests | |
parent | 79012c67849985be677cf63e363781e1992840fa (diff) |
Cleanup: use new c++ guarded allocator API
API added in rBa3ad5abf2fe85d623f9e78fefc34e27bdc14632e
Diffstat (limited to 'source/blender/blenlib/tests')
-rw-r--r-- | source/blender/blenlib/tests/BLI_task_test.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/tests/BLI_task_test.cc b/source/blender/blenlib/tests/BLI_task_test.cc index dd4441517a9..3bb6f6f753c 100644 --- a/source/blender/blenlib/tests/BLI_task_test.cc +++ b/source/blender/blenlib/tests/BLI_task_test.cc @@ -154,7 +154,7 @@ static void task_mempool_iter_tls_func(void *UNUSED(userdata), EXPECT_TRUE(data != nullptr); if (task_data->accumulate_items == nullptr) { - task_data->accumulate_items = (ListBase *)MEM_callocN(sizeof(ListBase), __func__); + task_data->accumulate_items = MEM_cnew<ListBase>(__func__); } /* Flip to prove this has been touched. */ @@ -172,7 +172,7 @@ static void task_mempool_iter_tls_reduce(const void *__restrict UNUSED(userdata) if (data_chunk->accumulate_items != nullptr) { if (join_chunk->accumulate_items == nullptr) { - join_chunk->accumulate_items = (ListBase *)MEM_callocN(sizeof(ListBase), __func__); + join_chunk->accumulate_items = MEM_cnew<ListBase>(__func__); } BLI_movelisttolist(join_chunk->accumulate_items, data_chunk->accumulate_items); } |