SharedPtr: Add a nullptr constructor

This commit is contained in:
apio 2023-01-13 18:54:39 +01:00
parent 445aeed80d
commit 16a62552db
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -30,6 +30,12 @@ template <typename T> class SharedPtr
using RefCount = __detail::RefCount;
public:
SharedPtr()
{
m_ptr = nullptr;
m_ref_count = nullptr;
}
SharedPtr(T* ptr, RefCount* ref_count) : m_ptr(ptr), m_ref_count(ref_count)
{
}