Commits

Scott Lawrence  committed ec8e011 Merge

merge changes for storm-1039

  • Participants
  • Parent commits 97195b5, 89a345e

Comments (0)

Files changed (1)

File indra/llmessage/llavatarnamecache.cpp

     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;
                                          << " 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;