mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:47:35 +00:00
AK: Remove use of copy_ref().
This commit is contained in:
parent
5254a320d8
commit
b0372883ff
4 changed files with 11 additions and 8 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue