common: Move classes to common namespace

This commit is contained in:
GPUCode 2023-11-05 16:56:28 +02:00
parent 996aa9d17a
commit 303f086b14
21 changed files with 190 additions and 199 deletions

View file

@ -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