1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-05 17:15:09 +00:00

Fix method hashes with default arguments

This commit is contained in:
David Snopek
2023-09-10 12:36:44 -05:00
parent fc99492d30
commit 0d13727c97
7 changed files with 937 additions and 8 deletions

View File

@@ -47,9 +47,11 @@ uint32_t MethodBind::get_hash() const {
}
hash = hash_murmur3_one_32(get_default_argument_count(), hash);
for (int i = 0; i < get_default_argument_count(); i++) {
Variant v = get_default_argument(i);
hash = hash_murmur3_one_32(v.hash(), hash);
for (int i = 0; i < get_argument_count(); i++) {
if (has_default_argument(i)) {
Variant v = get_default_argument(i);
hash = hash_murmur3_one_32(v.hash(), hash);
}
}
hash = hash_murmur3_one_32(is_const(), hash);