You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +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:
@@ -350,8 +350,8 @@ struct MeshInstance3DEditorEdgeSort {
|
||||
Vector2 b;
|
||||
|
||||
static uint32_t hash(const MeshInstance3DEditorEdgeSort &p_edge) {
|
||||
uint32_t h = hash_djb2_one_32(HashMapHasherDefault::hash(p_edge.a));
|
||||
return hash_djb2_one_32(HashMapHasherDefault::hash(p_edge.b), h);
|
||||
uint32_t h = hash_murmur3_one_32(HashMapHasherDefault::hash(p_edge.a));
|
||||
return hash_fmix32(hash_murmur3_one_32(HashMapHasherDefault::hash(p_edge.b), h));
|
||||
}
|
||||
|
||||
bool operator==(const MeshInstance3DEditorEdgeSort &p_b) const {
|
||||
|
||||
Reference in New Issue
Block a user