ams: deduplicate static initialization logic

This commit is contained in:
Michael Scire
2021-12-13 13:07:03 -08:00
parent 78f7218c4f
commit 30fac905af
24 changed files with 202 additions and 262 deletions

View File

@@ -34,7 +34,8 @@ namespace ams::lm::srv {
}
EventLogTransmitter &EventLogTransmitter::GetDefaultInstance() {
static constinit EventLogTransmitter s_default_event_log_transmitter(DefaultFlushFunction);
AMS_FUNCTION_LOCAL_STATIC_CONSTINIT(EventLogTransmitter, s_default_event_log_transmitter, DefaultFlushFunction);
return s_default_event_log_transmitter;
}