Allow intrusive_ptr::reset to take a new pointer
This commit is contained in:
parent
de060ce09a
commit
01f76f2b67
@ -80,11 +80,11 @@ public:
|
||||
T* operator->() const noexcept { return mPtr; }
|
||||
T* get() const noexcept { return mPtr; }
|
||||
|
||||
void reset() noexcept
|
||||
void reset(T *ptr=nullptr) noexcept
|
||||
{
|
||||
if(mPtr)
|
||||
mPtr->release();
|
||||
mPtr = nullptr;
|
||||
mPtr = ptr;
|
||||
}
|
||||
|
||||
T* release() noexcept
|
||||
|
Loading…
x
Reference in New Issue
Block a user