1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Remove RES and REF typedefs in favor of spelled out Ref<>

These typedefs don't save much typing compared to the full `Ref<Resource>`
and `Ref<RefCounted>`, yet they sometimes introduce confusion among
new contributors.
This commit is contained in:
Hugo Locurcio
2022-05-03 01:43:50 +02:00
parent 8762286110
commit 180e5d3028
147 changed files with 607 additions and 611 deletions

View File

@@ -133,11 +133,11 @@ void ScriptTextEditor::apply_code() {
code_editor->get_text_editor()->get_syntax_highlighter()->update_cache();
}
RES ScriptTextEditor::get_edited_resource() const {
Ref<Resource> ScriptTextEditor::get_edited_resource() const {
return script;
}
void ScriptTextEditor::set_edited_resource(const RES &p_res) {
void ScriptTextEditor::set_edited_resource(const Ref<Resource> &p_res) {
ERR_FAIL_COND(script.is_valid());
ERR_FAIL_COND(p_res.is_null());
@@ -1998,7 +1998,7 @@ ScriptTextEditor::~ScriptTextEditor() {
}
}
static ScriptEditorBase *create_editor(const RES &p_resource) {
static ScriptEditorBase *create_editor(const Ref<Resource> &p_resource) {
if (Object::cast_to<Script>(*p_resource)) {
return memnew(ScriptTextEditor);
}