diff options
author | Jacques Lucke <jacques@blender.org> | 2021-03-25 18:01:28 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-03-25 18:01:41 +0300 |
commit | 1d7adb6d8a3ee9126b9361f652da89f014bef423 (patch) | |
tree | f9ff96750df6eec018406506576bd90b9edc3beb /source/blender/functions | |
parent | 9b426269189ce00add24e48c951c45aca01f2076 (diff) |
BLI: simplify using DefaultHash
Diffstat (limited to 'source/blender/functions')
-rw-r--r-- | source/blender/functions/FN_cpp_type.hh | 2 | ||||
-rw-r--r-- | source/blender/functions/FN_cpp_type_make.hh | 2 | ||||
-rw-r--r-- | source/blender/functions/FN_multi_function.hh | 2 | ||||
-rw-r--r-- | source/blender/functions/FN_multi_function_builder.hh | 2 | ||||
-rw-r--r-- | source/blender/functions/FN_multi_function_data_type.hh | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/functions/FN_cpp_type.hh b/source/blender/functions/FN_cpp_type.hh index 665296f30e1..faf444e91f6 100644 --- a/source/blender/functions/FN_cpp_type.hh +++ b/source/blender/functions/FN_cpp_type.hh @@ -661,7 +661,7 @@ class CPPType : NonCopyable, NonMovable { uint64_t hash() const { - return DefaultHash<const CPPType *>{}(this); + return get_default_hash(this); } template<typename T> bool is() const diff --git a/source/blender/functions/FN_cpp_type_make.hh b/source/blender/functions/FN_cpp_type_make.hh index 342161d01b6..cd14fe8c078 100644 --- a/source/blender/functions/FN_cpp_type_make.hh +++ b/source/blender/functions/FN_cpp_type_make.hh @@ -220,7 +220,7 @@ template<typename T> bool is_equal_cb(const void *a, const void *b) template<typename T> uint64_t hash_cb(const void *value) { const T &value_ = *static_cast<const T *>(value); - return DefaultHash<T>{}(value_); + return get_default_hash(value_); } } // namespace blender::fn::cpp_type_util diff --git a/source/blender/functions/FN_multi_function.hh b/source/blender/functions/FN_multi_function.hh index 2ce65426245..f6c4addfb52 100644 --- a/source/blender/functions/FN_multi_function.hh +++ b/source/blender/functions/FN_multi_function.hh @@ -64,7 +64,7 @@ class MultiFunction { virtual uint64_t hash() const { - return DefaultHash<const MultiFunction *>{}(this); + return get_default_hash(this); } virtual bool equals(const MultiFunction &UNUSED(other)) const diff --git a/source/blender/functions/FN_multi_function_builder.hh b/source/blender/functions/FN_multi_function_builder.hh index 95a9f52e29e..691abeb18c0 100644 --- a/source/blender/functions/FN_multi_function_builder.hh +++ b/source/blender/functions/FN_multi_function_builder.hh @@ -384,7 +384,7 @@ template<typename T> class CustomMF_Constant : public MultiFunction { uint64_t hash() const override { - return DefaultHash<T>{}(value_); + return get_default_hash(value_); } bool equals(const MultiFunction &other) const override diff --git a/source/blender/functions/FN_multi_function_data_type.hh b/source/blender/functions/FN_multi_function_data_type.hh index 713f73c2b5a..c3372151a1b 100644 --- a/source/blender/functions/FN_multi_function_data_type.hh +++ b/source/blender/functions/FN_multi_function_data_type.hh @@ -110,7 +110,7 @@ class MFDataType { uint64_t hash() const { - return DefaultHash<CPPType>{}(*type_) + static_cast<uint64_t>(category_); + return get_default_hash_2(*type_, category_); } }; |