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

Hashmapify avatar icon control cache map

parent 1373dbad
No related branches found
No related tags found
No related merge requests found
...@@ -121,7 +121,7 @@ void LLAvatarIconIDCache::save () ...@@ -121,7 +121,7 @@ void LLAvatarIconIDCache::save ()
return; return;
} }
for(std::map<LLUUID,LLAvatarIconIDCacheItem>::iterator it = mCache.begin();it!=mCache.end();++it) for(auto it = mCache.begin();it!=mCache.end();++it)
{ {
if(!it->second.expired()) if(!it->second.expired())
{ {
...@@ -134,7 +134,7 @@ void LLAvatarIconIDCache::save () ...@@ -134,7 +134,7 @@ void LLAvatarIconIDCache::save ()
LLUUID* LLAvatarIconIDCache::get (const LLUUID& avatar_id) LLUUID* LLAvatarIconIDCache::get (const LLUUID& avatar_id)
{ {
std::map<LLUUID,LLAvatarIconIDCacheItem>::iterator it = mCache.find(avatar_id); auto it = mCache.find(avatar_id);
if(it==mCache.end()) if(it==mCache.end())
return 0; return 0;
if(it->second.expired()) if(it->second.expired())
......
...@@ -58,7 +58,7 @@ class LLAvatarIconIDCache final : public LLSingleton<LLAvatarIconIDCache> ...@@ -58,7 +58,7 @@ class LLAvatarIconIDCache final : public LLSingleton<LLAvatarIconIDCache>
std::string mFilename; std::string mFilename;
std::map<LLUUID,LLAvatarIconIDCacheItem> mCache;//we cache only LLUID and time absl::flat_hash_map<LLUUID,LLAvatarIconIDCacheItem> mCache;//we cache only LLUID and time
}; };
inline inline
......
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