mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 01:41:59 -05:00
AK: RefPtr::operator=(RefPtr<U>&&) needs to cast the incoming pointer.
Otherwise it's not possible to assign a RefPtr<Derived>&& to a RefPtr<Base>.
This commit is contained in:
parent
aeae1cb5e2
commit
fa6f601170
1 changed files with 1 additions and 1 deletions
|
@ -108,7 +108,7 @@ public:
|
|||
{
|
||||
if (this != static_cast<void*>(&other)) {
|
||||
deref_if_not_null(m_ptr);
|
||||
m_ptr = other.leak_ref();
|
||||
m_ptr = static_cast<T*>(other.leak_ref());
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue