diff options
author | Jacques Lucke <jacques@blender.org> | 2021-08-02 13:43:35 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-08-02 13:44:17 +0300 |
commit | 8edb2222ae0c954771a9cddc2d8c02a7a4d68eae (patch) | |
tree | 76b1a9631265f3a5a12355f7d64e54c1fd7369f4 /source/blender/functions/intern | |
parent | aa60416361364f56f9a173db9649e36f81442ce3 (diff) |
Cleanup: simplify subclassing CPPType
`CPPType` can wrap any C++ type so that code can work
with the wrapped type in a generic way. The goal of subclassing
`CPPType` is to provide additional methods for some types.
For example, the `CPPType` for `Array<int>` could have a `.element_type()`
method that returns the `CPPType` for `int`.
Diffstat (limited to 'source/blender/functions/intern')
-rw-r--r-- | source/blender/functions/intern/multi_function_network_optimization.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/functions/intern/multi_function_network_optimization.cc b/source/blender/functions/intern/multi_function_network_optimization.cc index 0f65d320f62..75c3583c5e5 100644 --- a/source/blender/functions/intern/multi_function_network_optimization.cc +++ b/source/blender/functions/intern/multi_function_network_optimization.cc @@ -263,7 +263,7 @@ static Array<MFOutputSocket *> add_constant_folded_sockets(const MultiFunction & const CPPType &cpp_type = data_type.single_type(); GMutableSpan array = params.computed_array(param_index); void *buffer = array.data(); - scope.add(buffer, array.type().members().destruct, AT); + scope.add(buffer, array.type().destruct_fn(), AT); constant_fn = &scope.construct<CustomMF_GenericConstant>(AT, cpp_type, buffer); break; |