From 03ef0cfe3c3327647be5289d8ecddea820401221 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 7 Oct 2020 16:13:01 +0200 Subject: Refactor `BKE_id_copy` to return the new ID pointer. No reasons to keep the new ID pointer as parameter here. Part of T71219. --- source/blender/editors/object/object_relations.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source/blender/editors/object') diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index e08a9148f15..1cc762dfb65 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -1819,8 +1819,7 @@ static Collection *single_object_users_collection(Main *bmain, /* Generate new copies for objects in given collection and all its children, * and optionally also copy collections themselves. */ if (copy_collections && !is_master_collection) { - Collection *collection_new; - BKE_id_copy(bmain, &collection->id, (ID **)&collection_new); + Collection *collection_new = (Collection *)BKE_id_copy(bmain, &collection->id); id_us_min(&collection_new->id); collection = ID_NEW_SET(collection, collection_new); } -- cgit v1.2.3