mirror of
https://github.com/Mr-X-GTA/GTAV-Classes-1.git
synced 2024-12-23 06:57:34 +08:00
23 lines
236 B
C++
23 lines
236 B
C++
|
#pragma once
|
||
|
|
||
|
namespace rage
|
||
|
{
|
||
|
template <typename T>
|
||
|
struct atSingleton
|
||
|
{
|
||
|
private:
|
||
|
T* m_basePtr{};
|
||
|
|
||
|
public:
|
||
|
bool isValid() const
|
||
|
{
|
||
|
return m_basePtr != nullptr;
|
||
|
}
|
||
|
|
||
|
T* getInstance()
|
||
|
{
|
||
|
return m_basePtr;
|
||
|
}
|
||
|
};
|
||
|
}
|