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
No known key found for this signature in database
GPG key ID: 39E8F8BE30B0A49C
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);
}