From a8ba25c1968e86a21bf777c9e0b72e11b132cdda Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Tue, 7 Jul 2020 23:15:42 -0400 Subject: [PATCH] Small opt to LL_*_ONCE logging functions --- indra/llcommon/llerror.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index be21417025c..3b793aa23c9 100644 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -41,6 +41,7 @@ # include <unistd.h> #endif // !LL_WINDOWS #include <vector> +#include <unordered_map> #include "string.h" #include "llapp.h" @@ -486,7 +487,7 @@ namespace LLError LevelMap mClassLevelMap; LevelMap mFileLevelMap; LevelMap mTagLevelMap; - std::map<std::string, unsigned int> mUniqueLogMessages; + std::unordered_map<std::string, unsigned int> mUniqueLogMessages; LLError::FatalFunction mCrashFunction; LLError::TimeFunction mTimeFunction; @@ -1348,7 +1349,7 @@ namespace LLError { std::ostringstream message_stream; - std::map<std::string, unsigned int>::iterator messageIter = s->mUniqueLogMessages.find(message); + auto messageIter = s->mUniqueLogMessages.find(message); if (messageIter != s->mUniqueLogMessages.end()) { messageIter->second++; -- GitLab