summaryrefslogtreecommitdiffstats
path: root/core/io
diff options
context:
space:
mode:
Diffstat (limited to 'core/io')
-rw-r--r--core/io/marshalls.cpp2
-rw-r--r--core/io/resource.cpp12
2 files changed, 7 insertions, 7 deletions
diff --git a/core/io/marshalls.cpp b/core/io/marshalls.cpp
index 2cdfacae17..1928f86d6a 100644
--- a/core/io/marshalls.cpp
+++ b/core/io/marshalls.cpp
@@ -1696,7 +1696,7 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
Variant value;
- if (E.name == CoreStringNames::get_singleton()->_script) {
+ if (E.name == CoreStringName(script)) {
Ref<Script> script = obj->get_script();
if (script.is_valid()) {
String path = script->get_path();
diff --git a/core/io/resource.cpp b/core/io/resource.cpp
index 4c3cfeaa58..24ff0e83d2 100644
--- a/core/io/resource.cpp
+++ b/core/io/resource.cpp
@@ -43,9 +43,9 @@
void Resource::emit_changed() {
if (ResourceLoader::is_within_load() && !Thread::is_main_thread()) {
// Let the connection happen on the main thread, later, since signals are not thread-safe.
- call_deferred("emit_signal", CoreStringNames::get_singleton()->changed);
+ call_deferred("emit_signal", CoreStringName(changed));
} else {
- emit_signal(CoreStringNames::get_singleton()->changed);
+ emit_signal(CoreStringName(changed));
}
}
@@ -172,8 +172,8 @@ void Resource::connect_changed(const Callable &p_callable, uint32_t p_flags) {
callable_mp(this, &Resource::connect_changed).call_deferred(p_callable, p_flags);
return;
}
- if (!is_connected(CoreStringNames::get_singleton()->changed, p_callable) || p_flags & CONNECT_REFERENCE_COUNTED) {
- connect(CoreStringNames::get_singleton()->changed, p_callable, p_flags);
+ if (!is_connected(CoreStringName(changed), p_callable) || p_flags & CONNECT_REFERENCE_COUNTED) {
+ connect(CoreStringName(changed), p_callable, p_flags);
}
}
@@ -183,8 +183,8 @@ void Resource::disconnect_changed(const Callable &p_callable) {
callable_mp(this, &Resource::disconnect_changed).call_deferred(p_callable);
return;
}
- if (is_connected(CoreStringNames::get_singleton()->changed, p_callable)) {
- disconnect(CoreStringNames::get_singleton()->changed, p_callable);
+ if (is_connected(CoreStringName(changed), p_callable)) {
+ disconnect(CoreStringName(changed), p_callable);
}
}