summaryrefslogtreecommitdiffstats
path: root/core/string/string_name.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/string/string_name.cpp')
-rw-r--r--core/string/string_name.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/string/string_name.cpp b/core/string/string_name.cpp
index 0294dbfbbc..dff19b3a41 100644
--- a/core/string/string_name.cpp
+++ b/core/string/string_name.cpp
@@ -162,6 +162,11 @@ void StringName::unref() {
_data = nullptr;
}
+uint32_t StringName::get_empty_hash() {
+ static uint32_t empty_hash = String::hash("");
+ return empty_hash;
+}
+
bool StringName::operator==(const String &p_name) const {
if (_data) {
return _data->operator==(p_name);