mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 10:52:22 +01:00
too much stuff
fix s3, fix health + backpack bug on 1.11, change replciation, fix 7.20 & 12.61, fix backpack on >S9, probably some other stuff i forgot
This commit is contained in:
36
Project Reboot 3.0/SharedPointer.h
Normal file
36
Project Reboot 3.0/SharedPointer.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
|
||||
template< class ObjectType>
|
||||
class TSharedPtr
|
||||
{
|
||||
public:
|
||||
ObjectType* Object;
|
||||
|
||||
int32 SharedReferenceCount;
|
||||
int32 WeakReferenceCount;
|
||||
|
||||
FORCEINLINE ObjectType* Get()
|
||||
{
|
||||
return Object;
|
||||
}
|
||||
FORCEINLINE ObjectType* Get() const
|
||||
{
|
||||
return Object;
|
||||
}
|
||||
FORCEINLINE ObjectType& operator*()
|
||||
{
|
||||
return *Object;
|
||||
}
|
||||
FORCEINLINE const ObjectType& operator*() const
|
||||
{
|
||||
return *Object;
|
||||
}
|
||||
FORCEINLINE ObjectType* operator->()
|
||||
{
|
||||
return Object;
|
||||
}
|
||||
FORCEINLINE ObjectType* operator->() const
|
||||
{
|
||||
return Object;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user