Skip to content
Snippets Groups Projects
Commit 1d8e0cc6 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Swap LLError internal LevelMap to absl::flat_hash_map for faster lookup speed

parent 872663f5
No related branches found
No related tags found
No related merge requests found
......@@ -451,7 +451,7 @@ namespace
}
typedef std::map<std::string, LLError::ELevel> LevelMap;
typedef absl::flat_hash_map<std::string, LLError::ELevel> LevelMap;
typedef std::vector<LLError::RecorderPtr> Recorders;
typedef std::vector<LLError::CallSite*> CallSiteVector;
......@@ -900,10 +900,9 @@ namespace LLError
namespace {
void setLevels(LevelMap& map, const LLSD& list, LLError::ELevel level)
{
LLSD::array_const_iterator i, end;
for (i = list.beginArray(), end = list.endArray(); i != end; ++i)
for (const auto& i : list.array())
{
map[*i] = level;
map[i.asString()] = level;
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment