[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>
|
||||
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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user