mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-12-11 19:03:58 +00:00
Add headers, clang-format, decompctx.py & more
This commit is contained in:
25
include/rstl/rc_ptr.hpp
Normal file
25
include/rstl/rc_ptr.hpp
Normal file
@@ -0,0 +1,25 @@
|
||||
#ifndef _RSTL_RC_PTR_HPP
|
||||
#define _RSTL_RC_PTR_HPP
|
||||
|
||||
#include "types.h"
|
||||
|
||||
template < typename T >
|
||||
class CRefData {
|
||||
public:
|
||||
T* x0_ptr;
|
||||
unsigned int x4_refCount;
|
||||
};
|
||||
|
||||
namespace rstl {
|
||||
template < typename T >
|
||||
class rc_ptr {
|
||||
CRefData< T >* x0_refData;
|
||||
|
||||
public:
|
||||
~rc_ptr();
|
||||
T* get() { return x0_refData->x0_ptr; }
|
||||
T* operator->() { return get(); }
|
||||
};
|
||||
} // namespace rstl
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user