Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #10897 from Hibyehello/LogManager-Fix
LogManager: Dynamically get last log type
  • Loading branch information
phire committed Jul 27, 2022
2 parents b6f5499 + 7e75bcd commit 1ea0c77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Source/Core/Common/Logging/Log.h
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Common/Logging/LogManager.h
Expand Up @@ -76,7 +76,7 @@ class LogManager
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;
Expand Down

0 comments on commit 1ea0c77

Please sign in to comment.