From 180e5d30286279c979507a571bf6d336aa49da9d Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Tue, 3 May 2022 01:43:50 +0200 Subject: Remove `RES` and `REF` typedefs in favor of spelled out `Ref<>` These typedefs don't save much typing compared to the full `Ref` and `Ref`, yet they sometimes introduce confusion among new contributors. --- modules/gdscript/language_server/gdscript_extend_parser.cpp | 2 +- modules/gdscript/language_server/gdscript_workspace.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/gdscript/language_server') diff --git a/modules/gdscript/language_server/gdscript_extend_parser.cpp b/modules/gdscript/language_server/gdscript_extend_parser.cpp index 4c4e810370..5516f59fe9 100644 --- a/modules/gdscript/language_server/gdscript_extend_parser.cpp +++ b/modules/gdscript/language_server/gdscript_extend_parser.cpp @@ -212,7 +212,7 @@ void ExtendGDScriptParser::parse_class_symbol(const GDScriptParser::ClassNode *p const Variant &default_value = m.constant->initializer->reduced_value; String value_text; if (default_value.get_type() == Variant::OBJECT) { - RES res = default_value; + Ref res = default_value; if (res.is_valid() && !res->get_path().is_empty()) { value_text = "preload(\"" + res->get_path() + "\")"; if (symbol.documentation.is_empty()) { diff --git a/modules/gdscript/language_server/gdscript_workspace.cpp b/modules/gdscript/language_server/gdscript_workspace.cpp index 229c322f26..89ee6b35e5 100644 --- a/modules/gdscript/language_server/gdscript_workspace.cpp +++ b/modules/gdscript/language_server/gdscript_workspace.cpp @@ -560,7 +560,7 @@ Node *GDScriptWorkspace::_get_owner_scene_node(String p_path) { for (int i = 0; i < owners.size(); i++) { NodePath owner_path = owners[i]; - RES owner_res = ResourceLoader::load(owner_path); + Ref owner_res = ResourceLoader::load(owner_path); if (Object::cast_to(owner_res.ptr())) { Ref owner_packed_scene = Ref(Object::cast_to(*owner_res)); owner_scene_node = owner_packed_scene->instantiate(); -- cgit v1.2.3