Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2020-10-07 15:27:33 +0300
committerBastien Montagne <bastien@blender.org>2020-10-07 19:05:06 +0300
commit7c9131d11eb01a70db440fac7bb3f4b3833d544a (patch)
treec7c495566a3f111c8c495f1daa207292bab9c43a /source/blender/blenkernel/intern/gpencil_modifier.c
parent1f50beb9f28edd2fe54d97647222ad6ee5808c1c (diff)
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.
Diffstat (limited to 'source/blender/blenkernel/intern/gpencil_modifier.c')
-rw-r--r--source/blender/blenkernel/intern/gpencil_modifier.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/gpencil_modifier.c b/source/blender/blenkernel/intern/gpencil_modifier.c
index 2eccdb872dd..d12e445fe99 100644
--- a/source/blender/blenkernel/intern/gpencil_modifier.c
+++ b/source/blender/blenkernel/intern/gpencil_modifier.c
@@ -660,10 +660,9 @@ static void gpencil_copy_activeframe_to_eval(
static bGPdata *gpencil_copy_for_eval(bGPdata *gpd)
{
- int flags = LIB_ID_COPY_LOCALIZE;
+ const int flags = LIB_ID_COPY_LOCALIZE;
- bGPdata *result;
- BKE_id_copy_ex(NULL, &gpd->id, (ID **)&result, flags);
+ bGPdata *result = (bGPdata *)BKE_id_copy_ex(NULL, &gpd->id, NULL, flags);
return result;
}