[ox][std] Fix UniquePtr to use provided deleter
This commit is contained in:
parent
1bf882c674
commit
4bc3da40b4
4
deps/ox/src/ox/std/memory.hpp
vendored
4
deps/ox/src/ox/std/memory.hpp
vendored
@ -39,7 +39,7 @@ class UniquePtr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
~UniquePtr() {
|
~UniquePtr() {
|
||||||
DefaultDelete<T>()(m_t);
|
Deleter()(m_t);
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr T *release() noexcept {
|
constexpr T *release() noexcept {
|
||||||
@ -58,7 +58,7 @@ class UniquePtr {
|
|||||||
auto t = m_t;
|
auto t = m_t;
|
||||||
m_t = other.m_t;
|
m_t = other.m_t;
|
||||||
other.m_t = nullptr;
|
other.m_t = nullptr;
|
||||||
DefaultDelete<T>()(t);
|
Deleter()(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename U>
|
template<typename U>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user