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:
authorSergey Sharybin <sergey@blender.org>2022-03-16 14:25:44 +0300
committerSergey Sharybin <sergey@blender.org>2022-03-16 14:38:23 +0300
commit42e13ea4bff4eafb46d16942436b89e166f9d844 (patch)
tree6de942072c7a72c655228395411fe9bd8cf06c0e /source/blender/editors/space_outliner/space_outliner.cc
parentddc54a2a6bfd1168ddd99f182ec6578ef91a986c (diff)
Cleanup: Deprecated field access in outliner_duplicate
Solved by introducing introducing a variant of MEM_cnew which behaves as a copy-constructor for a trivial types. Alternative approach would be to surround DNA structs with clang/gcc diagnostics push/modify/pop so that implicitly defined constructors and copy operators are allowed to access deprecated fields. The downside of the DNA approach is that it will require some way to easily apply diagnostics modifications to many structs, which is not possible currently. The newly added MEM_cnew has other good usecases, so is easiest to use this route, at least for now. Differential Revision: https://developer.blender.org/D14356
Diffstat (limited to 'source/blender/editors/space_outliner/space_outliner.cc')
-rw-r--r--source/blender/editors/space_outliner/space_outliner.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_outliner/space_outliner.cc b/source/blender/editors/space_outliner/space_outliner.cc
index f75182d25a0..97dc659155f 100644
--- a/source/blender/editors/space_outliner/space_outliner.cc
+++ b/source/blender/editors/space_outliner/space_outliner.cc
@@ -371,7 +371,7 @@ static void outliner_init(wmWindowManager *UNUSED(wm), ScrArea *area)
static SpaceLink *outliner_duplicate(SpaceLink *sl)
{
SpaceOutliner *space_outliner = (SpaceOutliner *)sl;
- SpaceOutliner *space_outliner_new = MEM_new<SpaceOutliner>(__func__, *space_outliner);
+ SpaceOutliner *space_outliner_new = MEM_cnew<SpaceOutliner>(__func__, *space_outliner);
BLI_listbase_clear(&space_outliner_new->tree);
space_outliner_new->treestore = nullptr;