diff options
Diffstat (limited to 'core/string_db.h')
-rw-r--r-- | core/string_db.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/core/string_db.h b/core/string_db.h index 45afbbe6fc..3b3249bf5e 100644 --- a/core/string_db.h +++ b/core/string_db.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -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); |