diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-06-29 00:29:49 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-06-29 00:29:49 -0300 |
commit | 95047562d743b1c1fdc007432c8a0c145a455c5d (patch) | |
tree | f563e5c900c4330fcc602b6e5a721bc63022b253 /core/string_db.h | |
parent | 2b64f73b0459190d20b2f6de39275ee7979317c4 (diff) | |
download | redot-engine-95047562d743b1c1fdc007432c8a0c145a455c5d.tar.gz |
Several performance improvements, mainly in loading and instancing scenes and resources.
A general speedup should be apparent, with even more peformance increase when compiling optimized.
WARNING: Tested and it seems to work, but if something breaks, please report.
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); |