FreeRTOS f*ckery

This commit is contained in:
Attila Body 2021-10-30 00:29:13 +02:00
parent 4e45521e52
commit 4e9d7b1334
8 changed files with 122 additions and 13 deletions

View file

@ -14,13 +14,8 @@ namespace f4ll_cpp {
template<typename T> class Singleton {
public:
static T &Instance() { return *m_instance; }
template<typename ... Args>
static T &Init(Args &&... args)
{
static T instance{ std::forward<Args>(args)... };
if(!m_instance)
m_instance = &instance;
static T &Instance() {
static T instance;
return instance;
}