summaryrefslogtreecommitdiff
path: root/editor/editor_autoload_settings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_autoload_settings.cpp')
-rw-r--r--editor/editor_autoload_settings.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp
index b37b06748d..4c73e36269 100644
--- a/editor/editor_autoload_settings.cpp
+++ b/editor/editor_autoload_settings.cpp
@@ -396,7 +396,7 @@ void EditorAutoloadSettings::_autoload_text_changed(const String p_name) {
}
Node *EditorAutoloadSettings::_create_autoload(const String &p_path) {
- RES res = ResourceLoader::load(p_path);
+ Ref<Resource> res = ResourceLoader::load(p_path);
ERR_FAIL_COND_V_MSG(res.is_null(), nullptr, "Can't autoload: " + p_path + ".");
Node *n = nullptr;
Ref<PackedScene> scn = res;
@@ -406,7 +406,7 @@ Node *EditorAutoloadSettings::_create_autoload(const String &p_path) {
} else if (script.is_valid()) {
StringName ibt = script->get_instance_base_type();
bool valid_type = ClassDB::is_parent_class(ibt, "Node");
- ERR_FAIL_COND_V_MSG(!valid_type, nullptr, "Script does not inherit a Node: " + p_path + ".");
+ ERR_FAIL_COND_V_MSG(!valid_type, nullptr, "Script does not inherit from Node: " + p_path + ".");
Object *obj = ClassDB::instantiate(ibt);
@@ -428,7 +428,7 @@ void EditorAutoloadSettings::update_autoload() {
updating_autoload = true;
- Map<String, AutoloadInfo> to_remove;
+ HashMap<String, AutoloadInfo> to_remove;
List<AutoloadInfo *> to_add;
for (const AutoloadInfo &info : autoload_cache) {