From 7e75bcd36fcccafcdb5ef74b5af353517b8b45c0 Mon Sep 17 00:00:00 2001 From: Josh <36666883+Hibyehello@users.noreply.github.com> Date: Tue, 26 Jul 2022 16:29:51 -0500 Subject: [PATCH] Use Dynamic last Log Type --- Source/Core/Common/Logging/Log.h | 3 +++ Source/Core/Common/Logging/LogManager.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Core/Common/Logging/Log.h b/Source/Core/Common/Logging/Log.h index 86a705e1ea..00ac869ac8 100644 --- a/Source/Core/Common/Logging/Log.h +++ b/Source/Core/Common/Logging/Log.h @@ -68,6 +68,9 @@ enum class LogType : int NUMBER_OF_LOGS // Must be last }; +constexpr LogType LAST_LOG_TYPE = + static_cast(static_cast(LogType::NUMBER_OF_LOGS) - 1); + enum class LogLevel : int { LNOTICE = 1, // VERY important information that is NOT errors. Like startup and OSReports. diff --git a/Source/Core/Common/Logging/LogManager.h b/Source/Core/Common/Logging/LogManager.h index acda7f7fe1..070edd82b4 100644 --- a/Source/Core/Common/Logging/LogManager.h +++ b/Source/Core/Common/Logging/LogManager.h @@ -76,7 +76,7 @@ private: LogManager& operator=(LogManager&&) = delete; LogLevel m_level; - EnumMap m_log{}; + EnumMap m_log{}; std::array m_listeners{}; BitSet32 m_listener_ids; size_t m_path_cutoff_point = 0;