mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 18:27:35 +00:00
Convert more RetainPtr use to Retained.
This commit is contained in:
parent
2cfcbdc735
commit
15fb917f28
16 changed files with 41 additions and 56 deletions
|
@ -36,6 +36,7 @@ public:
|
|||
enum AdoptTag { Adopt };
|
||||
|
||||
RETURN_TYPESTATE(unconsumed) Retained(T& object) : m_ptr(&object) { m_ptr->retain(); }
|
||||
template<typename U> RETURN_TYPESTATE(unconsumed) Retained(U& object) : m_ptr(&static_cast<T&>(object)) { m_ptr->retain(); }
|
||||
RETURN_TYPESTATE(unconsumed) Retained(AdoptTag, T& object) : m_ptr(&object) { }
|
||||
RETURN_TYPESTATE(unconsumed) Retained(Retained& other) : m_ptr(&other.copy_ref().leak_ref()) { }
|
||||
RETURN_TYPESTATE(unconsumed) Retained(Retained&& other) : m_ptr(&other.leak_ref()) { }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue