diff --git a/core/reference.h b/core/reference.h index b01e0035a77..36e7d5c6a66 100644 --- a/core/reference.h +++ b/core/reference.h @@ -170,9 +170,9 @@ public: return; } - Reference *r = Object::cast_to(object); + T *r = Object::cast_to(object); if (r && r->reference()) { - reference = static_cast(r); + reference = r; } } @@ -226,9 +226,9 @@ public: return; } - Reference *r = Object::cast_to(object); + T *r = Object::cast_to(object); if (r && r->reference()) { - reference = static_cast(r); + reference = r; } else { reference = nullptr; }