diff options
| author | Ricky Curtice <kf6kjg+hg@gmail.com> | 2011-04-29 14:23:27 -0700 |
|---|---|---|
| committer | Ricky Curtice <kf6kjg+hg@gmail.com> | 2011-04-29 14:23:27 -0700 |
| commit | 89216a6c213c126b8ab6dacaeb21340fa8f7a001 (patch) | |
| tree | 42d83ed5f5d34edf99c4b302d9d6744a33e5098f /indra/llmessage/llavatarnamecache.cpp | |
| parent | 26f2762b89705a69e831016ea67af9500907721d (diff) | |
| parent | 363e296dde5fbd56f9bf4382285b162712d582e2 (diff) | |
Merged with viewer-development.
The reason was to manually resolve a couple of merge problems, as upstream has had several changes since this was applied, and some of the changes overlapped.
Diffstat (limited to 'indra/llmessage/llavatarnamecache.cpp')
| -rw-r--r-- | indra/llmessage/llavatarnamecache.cpp | 10 |
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; |
