Fixes compat_ptr to return reference instead of copy

The expectation was that a reference would be returned rather than a copy.
Oops
This commit is contained in:
Ryan Houdek committed 2021-06-04 23:39:13 -07:00
1 parent 97c4ba018b
commit 2e8aacffe6
1 file changed
+3 -1
+3 -1
View File
@@ -48,7 +48,9 @@ public:
compat_ptr(uint32_t In) : Ptr {In} {}
compat_ptr(T *In) : Ptr {static_cast<uint32_t>(reinterpret_cast<uintptr_t>(In))} {}
T operator*() const {
template<typename T2 = T,
typename = std::enable_if<!std::is_same<T2, void>::value, T2>>
T2& operator*() const {
return *Interpret();
}