mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +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:
parent
8762286110
commit
180e5d3028
147 changed files with 607 additions and 611 deletions
|
|
@ -89,11 +89,11 @@ Ref<Texture2D> TextEditor::get_theme_icon() {
|
|||
return EditorNode::get_singleton()->get_object_icon(text_file.ptr(), "");
|
||||
}
|
||||
|
||||
RES TextEditor::get_edited_resource() const {
|
||||
Ref<Resource> TextEditor::get_edited_resource() const {
|
||||
return text_file;
|
||||
}
|
||||
|
||||
void TextEditor::set_edited_resource(const RES &p_res) {
|
||||
void TextEditor::set_edited_resource(const Ref<Resource> &p_res) {
|
||||
ERR_FAIL_COND(text_file.is_valid());
|
||||
ERR_FAIL_COND(p_res.is_null());
|
||||
|
||||
|
|
@ -412,7 +412,7 @@ void TextEditor::_convert_case(CodeTextEditor::CaseStyle p_case) {
|
|||
code_editor->convert_case(p_case);
|
||||
}
|
||||
|
||||
static ScriptEditorBase *create_editor(const RES &p_resource) {
|
||||
static ScriptEditorBase *create_editor(const Ref<Resource> &p_resource) {
|
||||
if (Object::cast_to<TextFile>(*p_resource)) {
|
||||
return memnew(TextEditor);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue