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/blenkernel/intern/cachefile.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'source/blender/blenkernel/intern/cachefile.c') diff --git a/source/blender/blenkernel/intern/cachefile.c b/source/blender/blenkernel/intern/cachefile.c index 9475ba7efcf..65dcf3673d6 100644 --- a/source/blender/blenkernel/intern/cachefile.c +++ b/source/blender/blenkernel/intern/cachefile.c @@ -256,9 +256,7 @@ void *BKE_cachefile_add(Main *bmain, const char *name) CacheFile *BKE_cachefile_copy(Main *bmain, const CacheFile *cache_file) { - CacheFile *cache_file_copy; - BKE_id_copy(bmain, &cache_file->id, (ID **)&cache_file_copy); - return cache_file_copy; + return (CacheFile *)BKE_id_copy(bmain, &cache_file->id); } void BKE_cachefile_reload(Depsgraph *depsgraph, CacheFile *cache_file) -- cgit v1.2.3