From 8fd65a225240fff200facdb916b0bf2c3026df7d Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Fri, 10 Jul 2020 12:56:57 +0200 Subject: Functions: use new is-equal and hash function of CPPType --- source/blender/functions/FN_multi_function_builder.hh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source/blender/functions/FN_multi_function_builder.hh') diff --git a/source/blender/functions/FN_multi_function_builder.hh b/source/blender/functions/FN_multi_function_builder.hh index 9be785f5a70..5905d1cc315 100644 --- a/source/blender/functions/FN_multi_function_builder.hh +++ b/source/blender/functions/FN_multi_function_builder.hh @@ -202,8 +202,6 @@ template class CustomMF_SM : public MultiFunction { } }; -bool generic_values_are_equal(const CPPType &type, const void *a, const void *b); - /** * A multi-function that outputs the same value every time. The value is not owned by an instance * of this function. The caller is responsible for destructing and freeing the value. @@ -271,8 +269,9 @@ template class CustomMF_Constant : public MultiFunction { const CustomMF_GenericConstant *other2 = dynamic_cast( &other); if (other2 != nullptr) { - if (CPPType::get() == other2->type_) { - return generic_values_are_equal(other2->type_, (const void *)&value_, other2->value_); + const CPPType &type = CPPType::get(); + if (type == other2->type_) { + return type.is_equal((const void *)&value_, other2->value_); } } return false; -- cgit v1.2.3