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`.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user