diff options
Diffstat (limited to 'core/string_db.h')
-rw-r--r-- | core/string_db.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/core/string_db.h b/core/string_db.h index 912d7513ad..3b3249bf5e 100644 --- a/core/string_db.h +++ b/core/string_db.h @@ -114,7 +114,17 @@ public: } bool operator!=(const StringName& p_name) const; - operator String() const; + _FORCE_INLINE_ operator String() const { + + if (_data) { + if (_data->cname ) + return String(_data->cname); + else + return _data->name; + } + + return String(); + } static StringName search(const char *p_name); static StringName search(const CharType *p_name); |