You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-22 15:06:45 +00:00
Clean up Hash Functions
Clean up and do fixes to hash functions and newly introduced murmur3 hashes in #61934 * Clean up usage of murmur3 * Fixed usages of binary murmur3 on floats (this is invalid) * Changed DJB2 to use xor (which seems to be better)
This commit is contained in:
@@ -190,13 +190,13 @@ uint32_t Array::recursive_hash(int recursion_count) const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t h = hash_djb2_one_32(Variant::ARRAY);
|
||||
uint32_t h = hash_murmur3_one_32(Variant::ARRAY);
|
||||
|
||||
recursion_count++;
|
||||
for (int i = 0; i < _p->array.size(); i++) {
|
||||
h = hash_djb2_one_32(_p->array[i].recursive_hash(recursion_count), h);
|
||||
h = hash_murmur3_one_32(_p->array[i].recursive_hash(recursion_count), h);
|
||||
}
|
||||
return h;
|
||||
return hash_fmix32(h);
|
||||
}
|
||||
|
||||
bool Array::_assign(const Array &p_array) {
|
||||
|
||||
Reference in New Issue
Block a user