summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorScott Mansell <phiren@gmail.com>2022-07-28 11:54:22 +1200
committerGitHub <noreply@github.com>2022-07-28 11:54:22 +1200
commit1ea0c7752e46461084ea60f878e446ece6fdbda0 (patch)
treeb0ca08b1ed030de3fd38f1c19c9036e988ae6f97 /Source
parentb6f5499c7cc7763b622ca4322192e6c83da706f1 (diff)
parent7e75bcd36fcccafcdb5ef74b5af353517b8b45c0 (diff)
Merge pull request #10897 from Hibyehello/LogManager-Fix
LogManager: Dynamically get last log type
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Common/Logging/Log.h3
-rw-r--r--Source/Core/Common/Logging/LogManager.h2
2 files changed, 4 insertions, 1 deletions
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<LogType>(static_cast<int>(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<LogContainer, LogType::WIIMOTE> m_log{};
+ EnumMap<LogContainer, LAST_LOG_TYPE> m_log{};
std::array<LogListener*, LogListener::NUMBER_OF_LISTENERS> m_listeners{};
BitSet32 m_listener_ids;
size_t m_path_cutoff_point = 0;