mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-07 09:56:59 +00:00
Add reset(pointer,deleter_type) member function to UniquePtr.
This commit is contained in:
parent
775357d04f
commit
42dbe7d026
@ -59,9 +59,19 @@ public:
|
||||
{
|
||||
if (m_ptr)
|
||||
m_deleter(m_ptr);
|
||||
|
||||
m_ptr = ptr;
|
||||
}
|
||||
|
||||
void reset(pointer ptr, deleter_type deleter)
|
||||
{
|
||||
if (m_ptr)
|
||||
m_deleter(m_ptr);
|
||||
|
||||
m_ptr = ptr;
|
||||
m_deleter = deleter;
|
||||
}
|
||||
|
||||
pointer release()
|
||||
{
|
||||
pointer ptr(m_ptr);
|
||||
|
Loading…
Reference in New Issue
Block a user