summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Logging/LogManager.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2024-06-15 20:02:10 +0200
committerJosJuice <josjuice@gmail.com>2024-06-15 20:06:34 +0200
commitea7928b3cda5749ba1dcc8e534b1474a28efb28a (patch)
treeaedb0d9cbcc07d03e008a42c3e5b984ffb7c6088 /Source/Core/Common/Logging/LogManager.cpp
parent04c246d11f60719d20af67c230cfe0a866dcaf54 (diff)
Android: Replace log type names map with array
Storing the log type names in a map results in them getting re-sorted by their keys, which doesn't quite give us the sorting we want. In particular, the Achievements category ended up being sorted at R (for RetroAchivements) instead of at A. Every use of the map is just iterating through it, so there's no real reason why it has to be a map anyway.
Diffstat (limited to 'Source/Core/Common/Logging/LogManager.cpp')
-rw-r--r--Source/Core/Common/Logging/LogManager.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/Common/Logging/LogManager.cpp b/Source/Core/Common/Logging/LogManager.cpp
index 749117bc74..283bd436e0 100644
--- a/Source/Core/Common/Logging/LogManager.cpp
+++ b/Source/Core/Common/Logging/LogManager.cpp
@@ -252,12 +252,13 @@ bool LogManager::IsEnabled(LogType type, LogLevel level) const
return m_log[type].m_enable && GetLogLevel() >= level;
}
-std::map<std::string, std::string> LogManager::GetLogTypes()
+std::vector<LogManager::LogContainer> LogManager::GetLogTypes()
{
- std::map<std::string, std::string> log_types;
+ std::vector<LogContainer> log_types;
+ log_types.reserve(m_log.size());
for (const auto& container : m_log)
- log_types.emplace(container.m_short_name, container.m_full_name);
+ log_types.emplace_back(container);
return log_types;
}