mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-12-16 00:57:00 +00:00
@@ -27,15 +27,14 @@ public:
|
||||
// x4_item = other.x4_item;
|
||||
// other.x0_has = false;
|
||||
// }
|
||||
T* get() { return x4_item; }
|
||||
/* const*/ T* get() const { return x4_item; }
|
||||
T* operator->() { return get(); }
|
||||
const T* operator->() const { return get(); }
|
||||
T* get() const { return x4_item; }
|
||||
T* operator->() const { return x4_item; }
|
||||
T& operator*() const { return *x4_item; }
|
||||
T* release() const {
|
||||
x0_has = false;
|
||||
return x4_item;
|
||||
}
|
||||
operator bool() const { return x0_has; }
|
||||
bool null() const { return x4_item == nullptr; }
|
||||
};
|
||||
} // namespace rstl
|
||||
|
||||
|
||||
@@ -17,8 +17,10 @@ class rc_ptr {
|
||||
|
||||
public:
|
||||
~rc_ptr();
|
||||
T* get() { return x0_refData->x0_ptr; }
|
||||
T* operator->() { return get(); }
|
||||
T* GetPtr() const { return x0_refData->x0_ptr; }
|
||||
// TODO ReleaseData__Q24rstl20rc_ptr
|
||||
T* operator->() const { return GetPtr(); }
|
||||
T& operator*() const { return *GetPtr(); }
|
||||
};
|
||||
|
||||
template < typename T >
|
||||
|
||||
@@ -20,7 +20,7 @@ public:
|
||||
delete x0_ptr;
|
||||
x0_ptr = ptr;
|
||||
}
|
||||
operator bool() const { return x0_ptr != nullptr; }
|
||||
bool null() const { return x0_ptr == nullptr; }
|
||||
T& operator*() { return *x0_ptr; }
|
||||
const T& operator*() const { return *x0_ptr; }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user