[ox/std] Fix UniquePtr reset to work when copying from a UniquePtr to subclass type
This commit is contained in:
parent
31dcd0d280
commit
0133ea30dc
3
deps/ox/src/ox/std/memory.hpp
vendored
3
deps/ox/src/ox/std/memory.hpp
vendored
@ -56,8 +56,7 @@ class UniquePtr {
|
|||||||
template<typename U>
|
template<typename U>
|
||||||
constexpr void reset(UniquePtr<U> &&other = UniquePtr()) {
|
constexpr void reset(UniquePtr<U> &&other = UniquePtr()) {
|
||||||
auto t = m_t;
|
auto t = m_t;
|
||||||
m_t = other.m_t;
|
m_t = other.release();
|
||||||
other.m_t = nullptr;
|
|
||||||
Deleter()(t);
|
Deleter()(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user