Various rstl fixes; continue CScriptMazeNode & CScriptPlatform

Former-commit-id: 7608f27ed2
This commit is contained in:
2022-09-18 13:51:07 -04:00
parent 0d94a5a5f3
commit f6f1040fff
25 changed files with 171 additions and 96 deletions

View File

@@ -6,7 +6,7 @@
namespace rstl {
template < typename T >
class single_ptr {
T* x0_ptr;
mutable T* x0_ptr;
public:
single_ptr() : x0_ptr(nullptr) {}
@@ -16,6 +16,9 @@ public:
// const T* get() const { return x0_ptr; }
T* operator->() { return x0_ptr; }
const T* operator->() const { return x0_ptr; }
single_ptr(const single_ptr& other) : x0_ptr(other.x0_ptr) {
other.x0_ptr = nullptr;
}
single_ptr& operator=(T* ptr) {
delete x0_ptr;
x0_ptr = ptr;