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:
authorJacques Lucke <jacques@blender.org>2021-03-07 16:24:52 +0300
committerJacques Lucke <jacques@blender.org>2021-03-07 16:24:52 +0300
commit649916f0983e4c59201672e6e28dcc7ae1f655b2 (patch)
treef8caa573963f0af1897b25cbda1352c5ea7474a1 /source/blender/modifiers
parent456d3cc85e9f408341b12eb0d4f2c3a925855e8c (diff)
BLI: make it harder to forget to destruct a value
Instead of returning a raw pointer, `LinearAllocator.construct(...)` now returns a `destruct_ptr`, which is similar to `unique_ptr`, but does not deallocate the memory and only calls the destructor instead.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_nodes.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc
index 4d1823b8951..50c07578173 100644
--- a/source/blender/modifiers/intern/MOD_nodes.cc
+++ b/source/blender/modifiers/intern/MOD_nodes.cc
@@ -1045,8 +1045,8 @@ static GeometrySet compute_geometry(const DerivedNodeTree &tree,
* modifier. */
const OutputSocketRef *first_input_socket = group_input_sockets[0];
if (first_input_socket->bsocket()->type == SOCK_GEOMETRY) {
- GeometrySet *geometry_set_in = allocator.construct<GeometrySet>(
- std::move(input_geometry_set));
+ GeometrySet *geometry_set_in =
+ allocator.construct<GeometrySet>(std::move(input_geometry_set)).release();
group_inputs.add_new({root_context, first_input_socket}, geometry_set_in);
remaining_input_sockets = remaining_input_sockets.drop_front(1);
}