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:
authorJacques Lucke <jacques@blender.org>2020-07-10 13:56:57 +0300
committerJacques Lucke <jacques@blender.org>2020-07-10 13:57:28 +0300
commit8fd65a225240fff200facdb916b0bf2c3026df7d (patch)
tree18d69a8c08b7ef5954c09311dd694fdca233ef3f /source/blender/functions/FN_multi_function_builder.hh
parent3edd2832b2f6cb24581951ee592917c524900fb5 (diff)
Functions: use new is-equal and hash function of CPPType
Diffstat (limited to 'source/blender/functions/FN_multi_function_builder.hh')
-rw-r--r--source/blender/functions/FN_multi_function_builder.hh7
1 files changed, 3 insertions, 4 deletions
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<typename Mut1> 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<typename T> class CustomMF_Constant : public MultiFunction {
const CustomMF_GenericConstant *other2 = dynamic_cast<const CustomMF_GenericConstant *>(
&other);
if (other2 != nullptr) {
- if (CPPType::get<T>() == other2->type_) {
- return generic_values_are_equal(other2->type_, (const void *)&value_, other2->value_);
+ const CPPType &type = CPPType::get<T>();
+ if (type == other2->type_) {
+ return type.is_equal((const void *)&value_, other2->value_);
}
}
return false;