Functions: provide dummy multi function

Sometimes it is convenient to be able to return a reference to some
dummy function.
This commit is contained in:
2020-06-30 18:05:44 +02:00
parent 67da2bd23a
commit c2ebf3edb4
3 changed files with 45 additions and 2 deletions

View File

@@ -88,9 +88,9 @@ class MultiFunction {
}
protected:
MFSignatureBuilder get_builder(StringRef function_name)
MFSignatureBuilder get_builder(std::string function_name)
{
m_signature.function_name = function_name;
m_signature.function_name = std::move(function_name);
return MFSignatureBuilder(m_signature);
}
};
@@ -100,6 +100,8 @@ inline MFParamsBuilder::MFParamsBuilder(const class MultiFunction &fn, uint min_
{
}
extern const MultiFunction &dummy_multi_function;
} // namespace fn
} // namespace blender