From 7c9131d11eb01a70db440fac7bb3f4b3833d544a Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 7 Oct 2020 14:27:33 +0200 Subject: Refactor `BKE_id_copy_ex` to return the new ID pointer. Note that possibility to pass the new ID pointer as parameter was kept, as this is needed for some rather specific cases (like in depsgraph/COW, when copying into already allocated memory). Part of T71219. --- source/blender/modifiers/intern/MOD_util.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/modifiers/intern/MOD_util.c') diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c index c1fdaa487b5..275e8a626d5 100644 --- a/source/blender/modifiers/intern/MOD_util.c +++ b/source/blender/modifiers/intern/MOD_util.c @@ -202,10 +202,10 @@ Mesh *MOD_deform_mesh_eval_get(Object *ob, /* TODO(sybren): after modifier conversion of DM to Mesh is done, check whether * we really need a copy here. Maybe the CoW ob->data can be directly used. */ Mesh *mesh_prior_modifiers = BKE_object_get_pre_modified_mesh(ob); - BKE_id_copy_ex(NULL, - &mesh_prior_modifiers->id, - (ID **)&mesh, - (LIB_ID_COPY_LOCALIZE | LIB_ID_COPY_CD_REFERENCE)); + mesh = (Mesh *)BKE_id_copy_ex(NULL, + &mesh_prior_modifiers->id, + NULL, + (LIB_ID_COPY_LOCALIZE | LIB_ID_COPY_CD_REFERENCE)); mesh->runtime.deformed_only = 1; } -- cgit v1.2.3