[ox/std] Fix UniquePtr reset to work when copying from a UniquePtr to subclass type

This commit is contained in:
Gary Talent 2021-10-29 21:40:58 -05:00
parent 31dcd0d280
commit 0133ea30dc

View File

@ -56,8 +56,7 @@ class UniquePtr {
template<typename U>
constexpr void reset(UniquePtr<U> &&other = UniquePtr()) {
auto t = m_t;
m_t = other.m_t;
other.m_t = nullptr;
m_t = other.release();
Deleter()(t);
}