SharedPtr: Add a nullptr constructor
This commit is contained in:
parent
445aeed80d
commit
16a62552db
@ -30,6 +30,12 @@ template <typename T> class SharedPtr
|
|||||||
using RefCount = __detail::RefCount;
|
using RefCount = __detail::RefCount;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
SharedPtr()
|
||||||
|
{
|
||||||
|
m_ptr = nullptr;
|
||||||
|
m_ref_count = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
SharedPtr(T* ptr, RefCount* ref_count) : m_ptr(ptr), m_ref_count(ref_count)
|
SharedPtr(T* ptr, RefCount* ref_count) : m_ptr(ptr), m_ref_count(ref_count)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user