diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h index a3510bfaf2e8427808525a79a8aaae5dfe16be55..db7be787e002cf9ecdc518685fc05d548f9398d4 100644 --- a/indra/newview/llfloaterimcontainer.h +++ b/indra/newview/llfloaterimcontainer.h @@ -124,7 +124,7 @@ class LLFloaterIMContainer final private: - typedef std::map<LLUUID,LLFloater*> avatarID_panel_map_t; + typedef absl::flat_hash_map<LLUUID,LLFloater*> avatarID_panel_map_t; avatarID_panel_map_t mSessions; boost::signals2::connection mNewMessageConnection; diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 2758ddf13dcbef829f48d28ca206184649a26b56..db234367838ad6d74a2af1154a78e4b68384d65f 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -871,7 +871,7 @@ LLIMModel::LLIMSession* LLIMModel::findAdHocIMSession(const uuid_vec_t& ids) if (mId2SessionMap.empty()) return NULL; - std::map<LLUUID, LLIMSession*>::const_iterator it = mId2SessionMap.begin(); + auto it = mId2SessionMap.begin(); for (; it != mId2SessionMap.end(); ++it) { LLIMSession* session = (*it).second; @@ -1097,9 +1097,10 @@ bool LLIMModel::newSession(const LLUUID& session_id, const std::string& name, co bool LLIMModel::clearSession(const LLUUID& session_id) { - if (mId2SessionMap.find(session_id) == mId2SessionMap.end()) return false; - delete (mId2SessionMap[session_id]); - mId2SessionMap.erase(session_id); + auto it = mId2SessionMap.find(session_id); + if (it == mId2SessionMap.end()) return false; + delete it->second; + mId2SessionMap.erase(it); return true; } diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 279cf9d06a2bd2dc3b6b91140cfa96592eeb82af..64ab0ec2b5f13d9da43d2761bab4cd38c4725cca 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -174,7 +174,7 @@ class LLIMModel final : public LLSingleton<LLIMModel> /** Session id to session object */ - std::map<LLUUID, LLIMSession*> mId2SessionMap; + absl::flat_hash_map<LLUUID, LLIMSession*> mId2SessionMap; typedef boost::signals2::signal<void(const LLSD&)> session_signal_t; session_signal_t mNewMsgSignal;