mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-24 04:15:01 +00:00
common: Move classes to common namespace
This commit is contained in:
parent
996aa9d17a
commit
303f086b14
21 changed files with 190 additions and 199 deletions
|
@ -2,10 +2,12 @@
|
|||
|
||||
#include <memory>
|
||||
|
||||
namespace Common {
|
||||
|
||||
template <class T>
|
||||
class singleton {
|
||||
class Singleton {
|
||||
public:
|
||||
static T* instance() {
|
||||
static T* Instance() {
|
||||
if (!m_instance) {
|
||||
m_instance = std::make_unique<T>();
|
||||
}
|
||||
|
@ -13,9 +15,11 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
singleton();
|
||||
~singleton();
|
||||
Singleton();
|
||||
~Singleton();
|
||||
|
||||
private:
|
||||
static inline std::unique_ptr<T> m_instance{};
|
||||
};
|
||||
|
||||
} // namespace Common
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue