[*] PmrCppHeapWrapper fixes

This commit is contained in:
Reece Wilson 2024-09-10 04:46:13 +01:00
parent e62a99777f
commit ffb1cbb09b

View File

@ -237,12 +237,29 @@ namespace Aurora::Memory
#endif
}
template <class Z>
bool operator==(const Aurora::Memory::PmrCppHeapWrapper<Z> &rhs) noexcept
{
return this->GetHeapRaw() == rhs.GetHeapRaw();
}
template <class Z>
bool operator!=(const Aurora::Memory::PmrCppHeapWrapper<Z> &rhs) noexcept
{
return this->GetHeapRaw() == rhs.GetHeapRaw();
}
template <class Z>
bool operator==(const Aurora::Memory::CppHeapWrapper<Z> &rhs) noexcept
{
return this->GetHeapRaw() == rhs.GetHeapRaw();
}
template <class Z>
bool operator!=(const Aurora::Memory::CppHeapWrapper<Z> &rhs) noexcept
{
return this->GetHeapRaw() == rhs.GetHeapRaw();
}
private:
#if defined(AU_NO_COMPRESS_CPPHEAP_WRAPPER)
mutable std::shared_ptr<void> spHeap;
@ -251,6 +268,8 @@ namespace Aurora::Memory
mutable std::shared_ptr<Heap> spHeap;
#endif
template <typename Z>
friend struct PmrCppHeapWrapper;
friend struct detail::AccessorICantEven;
};
@ -562,7 +581,9 @@ namespace Aurora::Memory
#endif
mutable CppHeapWrapper *pFuckCppRetardsFixYourWorthlessSpec {};
mutable CppHeapWrapper *pFuckCppRetardsFixYourWorthlessSpec2 {};
template <typename Z>
friend struct CppHeapWrapper;
friend struct detail::AccessorICantEven;
};
}
@ -579,4 +600,17 @@ inline bool operator==(const Aurora::Memory::PmrCppHeapWrapper<T> &lhs,
const Aurora::Memory::PmrCppHeapWrapper<Z> &rhs) noexcept
{
return lhs.GetHeapRaw() == rhs.GetHeapRaw();
}
template <class T, class Z>
inline bool operator!=(const Aurora::Memory::CppHeapWrapper<T> &lhs,
const Aurora::Memory::CppHeapWrapper<Z> &rhs) noexcept
{
return lhs.GetHeapRaw() != rhs.GetHeapRaw();
}
template <class T, class Z>
inline bool operator!=(const Aurora::Memory::PmrCppHeapWrapper<T> &lhs,
const Aurora::Memory::PmrCppHeapWrapper<Z> &rhs) noexcept
{
return lhs.GetHeapRaw() != rhs.GetHeapRaw();
}