ams: deduplicate static initialization logic

This commit is contained in:
Michael Scire committed 2021-12-13 13:07:03 -08:00
1 parent 78f7218c4f
commit 30fac905af
24 files changed
+202 -262

No files matched your search

@@ -19,8 +19,9 @@
namespace ams::lm::srv {
CustomSinkBuffer &LogGetterImpl::GetBuffer() {
static constinit u8 s_buffer[32_KB];
static constinit CustomSinkBuffer s_custom_sink_buffer(s_buffer, sizeof(s_buffer), FlushFunction);
AMS_FUNCTION_LOCAL_STATIC_CONSTINIT(u8, s_buffer[32_KB]);
AMS_FUNCTION_LOCAL_STATIC_CONSTINIT(CustomSinkBuffer, s_custom_sink_buffer, s_buffer, sizeof(s_buffer), FlushFunction);
return s_custom_sink_buffer;
}