Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/intern/type_conversions.cc')
-rw-r--r--source/blender/blenkernel/intern/type_conversions.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/type_conversions.cc b/source/blender/blenkernel/intern/type_conversions.cc
index d10979eeee9..aa79199d668 100644
--- a/source/blender/blenkernel/intern/type_conversions.cc
+++ b/source/blender/blenkernel/intern/type_conversions.cc
@@ -18,7 +18,11 @@ static void add_implicit_conversion(DataTypeConversions &conversions)
static const CPPType &to_type = CPPType::get<To>();
static const std::string conversion_name = from_type.name() + " to " + to_type.name();
- static fn::CustomMF_SI_SO<From, To> multi_function{conversion_name.c_str(), ConversionF};
+ static fn::CustomMF_SI_SO<From, To> multi_function{
+ conversion_name.c_str(),
+ /* Use lambda instead of passing #ConversionF directly, because otherwise the compiler won't
+ inline the function. */
+ [](const From &a) { return ConversionF(a); }};
static auto convert_single_to_initialized = [](const void *src, void *dst) {
*(To *)dst = ConversionF(*(const From *)src);
};