[ox/std] Fix UPtr compare with nullptr

This commit is contained in:
Gary Talent 2025-01-25 20:13:47 -06:00
parent 1f5c5a72ef
commit 6898f8eda1

View File

@ -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;
}