summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-04-25 07:35:32 -0400
committerOz Linden <oz@lindenlab.com>2011-04-25 07:35:32 -0400
commitc0fc4d81e6f35805e3cd1f4672c19b8612bac9a9 (patch)
tree68a9edac3882499cfc6f13a186c0f9826e865308
parente75d8342e0e6be64bfbff556995367fb553121de (diff)
parent38a0dbf04f24fc22f504485cdcd1efb274fc9a46 (diff)
merge changes for storm-1039
-rw-r--r--indra/llmessage/llavatarnamecache.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp
index 767001b633..33e6709983 100644
--- a/indra/llmessage/llavatarnamecache.cpp
+++ b/indra/llmessage/llavatarnamecache.cpp
@@ -553,12 +553,10 @@ void LLAvatarNameCache::eraseUnrefreshed()
if (!sLastExpireCheck || sLastExpireCheck < max_unrefreshed)
{
sLastExpireCheck = now;
- cache_t::iterator it = sCache.begin();
- while (it != sCache.end())
+
+ for (cache_t::iterator it = sCache.begin(); it != sCache.end(); ++it)
{
- cache_t::iterator cur = it;
- ++it;
- const LLAvatarName& av_name = cur->second;
+ const LLAvatarName& av_name = it->second;
if (av_name.mExpires < max_unrefreshed)
{
const LLUUID& agent_id = it->first;
@@ -566,7 +564,7 @@ void LLAvatarNameCache::eraseUnrefreshed()
<< " user '" << av_name.mUsername << "' "
<< "expired " << now - av_name.mExpires << " secs ago"
<< LL_ENDL;
- sCache.erase(cur);
+ sCache.erase(it);
}
}
LL_INFOS("AvNameCache") << sCache.size() << " cached avatar names" << LL_ENDL;