diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-09-11 12:34:56 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-09-11 12:34:56 +0200 |
commit | 3cad849b1f47747f69081086faa2db190706a829 (patch) | |
tree | e484be2f69c72b906f780e8ce965da0850525684 /core/string/string_name.h | |
parent | a4e77d94bc36ff3813c72d11b97086c6794c3a58 (diff) | |
parent | 0dde931bc95e6781190af0ba31fc2ab3af22c3bc (diff) | |
download | redot-engine-3cad849b1f47747f69081086faa2db190706a829.tar.gz |
Merge pull request #96586 from rune-scape/fix-empty-stringname-hash
StringName: Fix empty hash
Diffstat (limited to 'core/string/string_name.h')
-rw-r--r-- | core/string/string_name.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/string/string_name.h b/core/string/string_name.h index 288e2c7520..d4b70d311d 100644 --- a/core/string/string_name.h +++ b/core/string/string_name.h @@ -83,6 +83,7 @@ class StringName { static inline Mutex mutex; static void setup(); static void cleanup(); + static uint32_t get_empty_hash(); static inline bool configured = false; #ifdef DEBUG_ENABLED struct DebugSortReferences { @@ -139,7 +140,7 @@ public: if (_data) { return _data->hash; } else { - return 0; + return get_empty_hash(); } } _FORCE_INLINE_ const void *data_unique_pointer() const { |