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:
2023-01-07 16:30:56 +01:00
parent b3146200a8
commit 577442a26f
33 changed files with 331 additions and 303 deletions

View File

@@ -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 &param : 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_);
}