mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-19 02:16:55 +08:00
Merge branch 'hotfix/add-deleter-constructor-to-unique-ptr'
This commit is contained in:
commit
2bb66c2e17
@ -1256,6 +1256,7 @@ namespace etl
|
||||
//*********************************
|
||||
unique_ptr(unique_ptr&& p_) ETL_NOEXCEPT
|
||||
: p(p_.release())
|
||||
, deleter(etl::move(p_.deleter))
|
||||
{
|
||||
}
|
||||
#endif
|
||||
@ -1281,7 +1282,10 @@ namespace etl
|
||||
//*********************************
|
||||
~unique_ptr()
|
||||
{
|
||||
deleter(p);
|
||||
if (p != ETL_NULLPTR)
|
||||
{
|
||||
deleter(p);
|
||||
}
|
||||
}
|
||||
|
||||
//*********************************
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user