1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 16:37:47 +00:00

AK: Remove use of copy_ref().

This commit is contained in:
Andreas Kling 2019-07-11 15:45:11 +02:00
parent 5254a320d8
commit b0372883ff
4 changed files with 11 additions and 8 deletions

View file

@ -51,7 +51,7 @@ public:
bool operator==(const OwnPtr<T>& other) const { return ptr() == other.ptr(); }
private:
WeakPtr(RefPtr<WeakLink<T>>&& link)
WeakPtr(RefPtr<WeakLink<T>> link)
: m_link(move(link))
{
}
@ -64,7 +64,7 @@ inline WeakPtr<T> Weakable<T>::make_weak_ptr()
{
if (!m_link)
m_link = adopt(*new WeakLink<T>(static_cast<T&>(*this)));
return WeakPtr<T>(m_link.copy_ref());
return WeakPtr<T>(m_link);
}
template<typename T>