mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 06:11:29 +03: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:
@@ -108,7 +108,7 @@ Variant WeakRef::get_ref() const {
|
||||
}
|
||||
RefCounted *r = cast_to<RefCounted>(obj);
|
||||
if (r) {
|
||||
return REF(r);
|
||||
return Ref<RefCounted>(r);
|
||||
}
|
||||
|
||||
return obj;
|
||||
@@ -118,7 +118,7 @@ void WeakRef::set_obj(Object *p_object) {
|
||||
ref = p_object ? p_object->get_instance_id() : ObjectID();
|
||||
}
|
||||
|
||||
void WeakRef::set_ref(const REF &p_ref) {
|
||||
void WeakRef::set_ref(const Ref<RefCounted> &p_ref) {
|
||||
ref = p_ref.is_valid() ? p_ref->get_instance_id() : ObjectID();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user