Functions: build multi-function signature in-place
This avoids a move of the signature after building it. Tthe value had to be moved out of `MFSignatureBuilder` in the `build` method. This also makes the naming a bit less confusing where sometimes both the `MFSignature` and `MFSignatureBuilder` were referred to as "signature".
This commit is contained in:
@@ -8,13 +8,12 @@ namespace blender::fn {
|
||||
|
||||
MFProcedureExecutor::MFProcedureExecutor(const MFProcedure &procedure) : procedure_(procedure)
|
||||
{
|
||||
MFSignatureBuilder signature("Procedure Executor");
|
||||
MFSignatureBuilder builder("Procedure Executor", signature_);
|
||||
|
||||
for (const ConstMFParameter ¶m : procedure.params()) {
|
||||
signature.add("Parameter", MFParamType(param.type, param.variable->data_type()));
|
||||
builder.add("Parameter", MFParamType(param.type, param.variable->data_type()));
|
||||
}
|
||||
|
||||
signature_ = signature.build();
|
||||
this->set_signature(&signature_);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user