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

@@ -188,7 +188,7 @@ namespace ams::lm::srv {
size_t carry_size;
bool ends_with_text_log;
};
static constinit PreviousPacketContext s_previous_packet_context = {};
AMS_FUNCTION_LOCAL_STATIC_CONSTINIT(PreviousPacketContext, s_previous_packet_context);
/* Get the packet header. */
auto *header = static_cast<const impl::LogPacketHeader *>(buffer);