summaryrefslogtreecommitdiff
path: root/indra/llmessage
diff options
context:
space:
mode:
authorDebi King (Dessie) <dessie@lindenlab.com>2011-05-09 18:00:23 -0400
committerDebi King (Dessie) <dessie@lindenlab.com>2011-05-09 18:00:23 -0400
commit77c39cef5292ca9fcd13aafeb074ef2b715baed8 (patch)
tree90e19b4b9c73d9f9721bc628f50cf5de6829a0ba /indra/llmessage
parent0994f9485534c35ca92b4ce1421544b7de8feea2 (diff)
parentf7bd5b98949fc72ac1fd4b97ecd4907e14c04315 (diff)
merged .hgtags from viewer-pre-beta
Diffstat (limited to 'indra/llmessage')
-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;