Functions: simplify multi-function signature type

* `depends_on_context` was not used for a long time already.
* `param_data_indices` is not used since rB42b88c008861b6.
* The remaining data is moved to a single `Vector` to avoid
  having to do two allocations when the size signature becomes
  larger than fits into the inline buffer.
This commit is contained in:
2023-01-07 16:51:26 +01:00
parent 577442a26f
commit a5b27f9858
5 changed files with 27 additions and 46 deletions

View File

@@ -67,22 +67,22 @@ class MultiFunction {
int param_amount() const
{
return signature_ref_->param_types.size();
return signature_ref_->params.size();
}
IndexRange param_indices() const
{
return signature_ref_->param_types.index_range();
return signature_ref_->params.index_range();
}
MFParamType param_type(int param_index) const
{
return signature_ref_->param_types[param_index];
return signature_ref_->params[param_index].type;
}
StringRefNull param_name(int param_index) const
{
return signature_ref_->param_names[param_index];
return signature_ref_->params[param_index].name;
}
StringRefNull name() const
@@ -92,11 +92,6 @@ class MultiFunction {
virtual std::string debug_name() const;
bool depends_on_context() const
{
return signature_ref_->depends_on_context;
}
const MFSignature &signature() const
{
BLI_assert(signature_ref_ != nullptr);