Cleanup: unnecessary copy

This partially reverts 521cd53f2915473dd0a2d86ce77fabdee708d63f.

Pull Request: https://projects.blender.org/blender/blender/pulls/121783
This commit is contained in:
Iliya Katueshenock 2024-05-23 14:07:43 +02:00 committed by Jacques Lucke
parent 180474aaee
commit 7fac204909
2 changed files with 3 additions and 5 deletions

@ -86,7 +86,7 @@ class ParamType {
return ParamType(InterfaceType::Mutable, DataType::ForVector(base_type));
}
DataType data_type() const
const DataType &data_type() const
{
return data_type_;
}

@ -559,14 +559,12 @@ static void execute_multi_function_on_value_variant(const MultiFunction &fn,
SocketValueVariant &input_variant = *input_values[i];
input_variant.convert_to_single();
const void *value = input_variant.get_single_ptr_raw();
const mf::DataType data_type = fn.param_type(params.next_param_index()).data_type();
const CPPType &cpp_type = data_type.single_type();
const CPPType &cpp_type = fn.param_type(params.next_param_index()).data_type().single_type();
params.add_readonly_single_input(GPointer{cpp_type, value});
}
for (const int i : output_values.index_range()) {
SocketValueVariant &output_variant = *output_values[i];
const mf::DataType data_type = fn.param_type(params.next_param_index()).data_type();
const CPPType &cpp_type = data_type.single_type();
const CPPType &cpp_type = fn.param_type(params.next_param_index()).data_type().single_type();
const eNodeSocketDatatype socket_type =
bke::geo_nodes_base_cpp_type_to_socket_type(cpp_type).value();
void *value = output_variant.allocate_single(socket_type);