You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Rewrite HashMapHasherDefault based on type traits - it is now possible to declare a default hashing function for any type.
Remove cross-project includes from `hashfuncs.h`. Improve hashing function for `Color` (based on values instead of `String`). Move `Variant` comparison from `hash_map.h` to `dictionary.cpp` (`VariantComparatorDictionary`), where it's used. Remove now unnecessary `HashableHasher`.
This commit is contained in:
@@ -70,6 +70,8 @@ class GridMap : public Node3D {
|
||||
return Vector3i(x, y, z);
|
||||
}
|
||||
|
||||
uint32_t hash() const { return operator Vector3i().hash(); }
|
||||
|
||||
IndexKey(Vector3i p_vector) {
|
||||
x = (int16_t)p_vector.x;
|
||||
y = (int16_t)p_vector.y;
|
||||
|
||||
Reference in New Issue
Block a user