[ox/std] Fix UPtr compare with nullptr
This commit is contained in:
parent
1f5c5a72ef
commit
6898f8eda1
4
deps/ox/src/ox/std/memory.hpp
vendored
4
deps/ox/src/ox/std/memory.hpp
vendored
@ -260,12 +260,12 @@ constexpr bool operator==(const UniquePtr<T> &p1, const UniquePtr<T> &p2) noexce
|
||||
|
||||
template<typename T>
|
||||
constexpr bool operator==(const UniquePtr<T> &p1, std::nullptr_t) noexcept {
|
||||
return p1.get();
|
||||
return p1.get() == nullptr;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
constexpr bool operator==(std::nullptr_t, const UniquePtr<T> &p2) noexcept {
|
||||
return p2.get();
|
||||
return p2.get() == nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user