diff options
Diffstat (limited to 'core/reference.h')
-rw-r--r-- | core/reference.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/core/reference.h b/core/reference.h index b01e0035a7..fd42c4e537 100644 --- a/core/reference.h +++ b/core/reference.h @@ -38,7 +38,6 @@ class Reference : public Object { GDCLASS(Reference, Object); - friend class RefBase; SafeRefCount refcount; SafeRefCount refcount_init; @@ -170,9 +169,9 @@ public: return; } - Reference *r = Object::cast_to<Reference>(object); + T *r = Object::cast_to<T>(object); if (r && r->reference()) { - reference = static_cast<T *>(r); + reference = r; } } @@ -226,9 +225,9 @@ public: return; } - Reference *r = Object::cast_to<Reference>(object); + T *r = Object::cast_to<T>(object); if (r && r->reference()) { - reference = static_cast<T *>(r); + reference = r; } else { reference = nullptr; } |