mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-17 16:44:22 -04:00
loader: refactor ro manager/improve accuracy
This commit is contained in:
parent
d8a36e39f2
commit
d9dc04318d
24 changed files with 328 additions and 218 deletions
|
@ -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; \
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue