summaryrefslogtreecommitdiff
path: root/scene/resources/sample_library.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-06-29 00:29:49 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-06-29 00:29:49 -0300
commit95047562d743b1c1fdc007432c8a0c145a455c5d (patch)
treef563e5c900c4330fcc602b6e5a721bc63022b253 /scene/resources/sample_library.cpp
parent2b64f73b0459190d20b2f6de39275ee7979317c4 (diff)
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 'scene/resources/sample_library.cpp')
-rw-r--r--scene/resources/sample_library.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/resources/sample_library.cpp b/scene/resources/sample_library.cpp
index 6bb9bc0d06..ffcaa1e675 100644
--- a/scene/resources/sample_library.cpp
+++ b/scene/resources/sample_library.cpp
@@ -34,7 +34,7 @@ bool SampleLibrary::_set(const StringName& p_name, const Variant& p_value) {
if (String(p_name).begins_with("samples/")) {
- String name=String(p_name).get_slice("/",1);
+ String name=String(p_name).get_slicec('/',1);
if (p_value.get_type()==Variant::NIL)
sample_map.erase(name);
else {
@@ -66,7 +66,7 @@ bool SampleLibrary::_get(const StringName& p_name,Variant &r_ret) const {
if (String(p_name).begins_with("samples/")) {
- String name=String(p_name).get_slice("/",1);
+ String name=String(p_name).get_slicec('/',1);
if(sample_map.has(name)) {
Dictionary d;
d["sample"]=sample_map[name].sample;