loader: refactor ro manager/improve accuracy

This commit is contained in:
Michael Scire 2021-10-10 18:22:32 -07:00
parent d8a36e39f2
commit d9dc04318d
24 changed files with 328 additions and 218 deletions

View file

@ -43,3 +43,16 @@
\
return ::ams::util::GetReference(s_singleton_storage); \
}
#define AMS_CONSTINIT_SINGLETON_TRAITS(_CLASSNAME_) \
private: \
NON_COPYABLE(_CLASSNAME_); \
NON_MOVEABLE(_CLASSNAME_); \
private: \
constexpr _CLASSNAME_ () = default; \
public: \
static _CLASSNAME_ &GetInstance() { \
/* Declare singleton instance variables. */ \
static constinit _CLASSNAME_ s_singleton_instance; \
return s_singleton_instance; \
}