Add headers, clang-format, decompctx.py & more

Former-commit-id: 53f8d3cba7
This commit is contained in:
2022-04-09 20:17:06 -04:00
parent 73b7b4df3a
commit 27d94af97b
83 changed files with 3919 additions and 2665 deletions

View File

@@ -0,0 +1,24 @@
#ifndef _RSTL_SINGLE_PTR_HPP
#define _RSTL_SINGLE_PTR_HPP
#include "types.h"
namespace rstl {
template < typename T >
class single_ptr {
T* x0_ptr;
public:
single_ptr() : x0_ptr(nullptr) {}
single_ptr(T* ptr) : x0_ptr(ptr) {}
~single_ptr() { delete x0_ptr; }
T* get() { return x0_ptr; }
T* operator->() { return x0_ptr; }
void operator=(T* ptr) {
delete x0_ptr;
x0_ptr = ptr;
}
};
} // namespace rstl
#endif