diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-06-20 14:01:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-20 14:01:06 +0200 |
commit | 66a30dab35f3788ae28c7e6171d3908fe75e7b75 (patch) | |
tree | cc5045d98995b754097d1dde100f0138033fc735 /core/variant/variant_call.cpp | |
parent | 8e3d9a23aa0a724d3dd25fcf0e8085b5a438c233 (diff) | |
parent | 141c3755814cea60888c7ee548c7ce709550b784 (diff) |
Merge pull request #62176 from reduz/cleanup-hashfuncs
Diffstat (limited to 'core/variant/variant_call.cpp')
-rw-r--r-- | core/variant/variant_call.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp index 6e8dc64811..cb9dfe478b 100644 --- a/core/variant/variant_call.cpp +++ b/core/variant/variant_call.cpp @@ -1170,19 +1170,19 @@ uint32_t Variant::get_builtin_method_hash(Variant::Type p_type, const StringName ERR_FAIL_INDEX_V(p_type, Variant::VARIANT_MAX, 0); const VariantBuiltInMethodInfo *method = builtin_method_info[p_type].lookup_ptr(p_method); ERR_FAIL_COND_V(!method, 0); - uint32_t hash = hash_djb2_one_32(method->is_const); - hash = hash_djb2_one_32(method->is_static, hash); - hash = hash_djb2_one_32(method->is_vararg, hash); - hash = hash_djb2_one_32(method->has_return_type, hash); + uint32_t hash = hash_murmur3_one_32(method->is_const); + hash = hash_murmur3_one_32(method->is_static, hash); + hash = hash_murmur3_one_32(method->is_vararg, hash); + hash = hash_murmur3_one_32(method->has_return_type, hash); if (method->has_return_type) { - hash = hash_djb2_one_32(method->return_type, hash); + hash = hash_murmur3_one_32(method->return_type, hash); } - hash = hash_djb2_one_32(method->argument_count, hash); + hash = hash_murmur3_one_32(method->argument_count, hash); for (int i = 0; i < method->argument_count; i++) { - hash = method->get_argument_type(i); + hash = hash_murmur3_one_32(method->get_argument_type(i), hash); } - return hash; + return hash_fmix32(hash); } void Variant::get_method_list(List<MethodInfo> *p_list) const { |