From d2814ebbf351a7e4f485c87c4c6c4bde285663a7 Mon Sep 17 00:00:00 2001 From: dementive <87823030+dementive@users.noreply.github.com> Date: Sun, 8 Jun 2025 14:21:29 -0400 Subject: [PATCH] Add missing Color hash function --- core/templates/hashfuncs.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/templates/hashfuncs.h b/core/templates/hashfuncs.h index 530ebbcc6e1..05870f77e98 100644 --- a/core/templates/hashfuncs.h +++ b/core/templates/hashfuncs.h @@ -389,6 +389,13 @@ struct HashMapHasherDefault { h = hash_murmur3_one_real(p_vec.w, h); return hash_fmix32(h); } + static _FORCE_INLINE_ uint32_t hash(const Color &p_vec) { + uint32_t h = hash_murmur3_one_float(p_vec.r); + h = hash_murmur3_one_float(p_vec.g, h); + h = hash_murmur3_one_float(p_vec.b, h); + h = hash_murmur3_one_float(p_vec.a, h); + return hash_fmix32(h); + } static _FORCE_INLINE_ uint32_t hash(const Rect2i &p_rect) { uint32_t h = hash_murmur3_one_32(uint32_t(p_rect.position.x)); h = hash_murmur3_one_32(uint32_t(p_rect.position.y), h);