From d6ada53971af6c20bc0a64525cbdebc298f8da13 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Thu, 2 Feb 2023 17:44:56 -0500
Subject: [PATCH] More unordered_map for inventory and groups

---
 indra/newview/llaisapi.cpp       | 2 +-
 indra/newview/llaisapi.h         | 6 +++---
 indra/newview/llgroupmgr.h       | 8 ++++----
 indra/newview/llinventorymodel.h | 6 +++---
 indra/newview/llstylemap.h       | 2 +-
 5 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp
index f8832de661d..5ad1da776f5 100644
--- a/indra/newview/llaisapi.cpp
+++ b/indra/newview/llaisapi.cpp
@@ -949,7 +949,7 @@ void AISUpdate::parseEmbeddedCategories(const LLSD& categories)
 void AISUpdate::doUpdate()
 {
 	// Do version/descendant accounting.
-	for (std::map<LLUUID,S32>::const_iterator catit = mCatDescendentDeltas.begin();
+	for (auto catit = mCatDescendentDeltas.begin();
 		 catit != mCatDescendentDeltas.end(); ++catit)
 	{
 #ifdef SHOW_DEBUG
diff --git a/indra/newview/llaisapi.h b/indra/newview/llaisapi.h
index fbacf418c02..0bfa3d3c41a 100644
--- a/indra/newview/llaisapi.h
+++ b/indra/newview/llaisapi.h
@@ -109,15 +109,15 @@ class AISUpdate
 private:
 	void clearParseResults();
 
-	typedef std::map<LLUUID,S32> uuid_int_map_t;
+	typedef boost::unordered_map<LLUUID,S32> uuid_int_map_t;
 	uuid_int_map_t mCatDescendentDeltas;
 	uuid_int_map_t mCatDescendentsKnown;
 	uuid_int_map_t mCatVersionsUpdated;
 
-	typedef std::map<LLUUID,LLPointer<LLViewerInventoryItem> > deferred_item_map_t;
+	typedef boost::unordered_map<LLUUID,LLPointer<LLViewerInventoryItem> > deferred_item_map_t;
 	deferred_item_map_t mItemsCreated;
 	deferred_item_map_t mItemsUpdated;
-	typedef std::map<LLUUID,LLPointer<LLViewerInventoryCategory> > deferred_category_map_t;
+	typedef boost::unordered_map<LLUUID,LLPointer<LLViewerInventoryCategory> > deferred_category_map_t;
 	deferred_category_map_t mCategoriesCreated;
 	deferred_category_map_t mCategoriesUpdated;
 
diff --git a/indra/newview/llgroupmgr.h b/indra/newview/llgroupmgr.h
index f78ae6834f7..30b2aa35999 100644
--- a/indra/newview/llgroupmgr.h
+++ b/indra/newview/llgroupmgr.h
@@ -273,11 +273,11 @@ friend class LLGroupMgr;
 	void banMemberById(const LLUUID& participant_uuid);
 	
 public:
-	typedef	boost::unordered_flat_map<LLUUID, LLGroupMemberData*> member_list_t;
-	typedef	std::map<LLUUID,LLGroupRoleData*> role_list_t;
+	typedef	boost::unordered_map<LLUUID, LLGroupMemberData*> member_list_t;
+	typedef	boost::unordered_map<LLUUID,LLGroupRoleData*> role_list_t;
 	typedef std::map<lluuid_pair,LLRoleMemberChange,lluuid_pair_less> change_map_t;
-	typedef std::map<LLUUID,LLRoleData> role_data_map_t;
-	typedef std::map<LLUUID,LLGroupBanData> ban_list_t;
+	typedef boost::unordered_map<LLUUID,LLRoleData> role_data_map_t;
+	typedef boost::unordered_map<LLUUID,LLGroupBanData> ban_list_t;
 
 	member_list_t		mMembers;
 	role_list_t			mRoles;
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index 67b925bf63e..eb648093899 100644
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -540,7 +540,7 @@ class LLInventoryModel
 		LLInitializedS32& operator++() { ++mValue; return *this; }
 		LLInitializedS32& operator--() { --mValue; return *this; }
 	};
-	typedef std::map<LLUUID, LLInitializedS32> update_map_t;
+	typedef boost::unordered_map<LLUUID, LLInitializedS32> update_map_t;
 
 	// Call when there are category updates.  Call them *before* the 
 	// actual update so the method can do descendent accounting correctly.
@@ -716,8 +716,8 @@ class LLInventoryModel
 	cat_array_t* getUnlockedCatArray(const LLUUID& id);
 	item_array_t* getUnlockedItemArray(const LLUUID& id);
 private:
-	std::map<LLUUID, bool> mCategoryLock;
-	std::map<LLUUID, bool> mItemLock;
+	boost::unordered_map<LLUUID, bool> mCategoryLock;
+	boost::unordered_map<LLUUID, bool> mItemLock;
 	
 	//--------------------------------------------------------------------
 	// Debugging
diff --git a/indra/newview/llstylemap.h b/indra/newview/llstylemap.h
index 619141f3365..9f14039dcb0 100644
--- a/indra/newview/llstylemap.h
+++ b/indra/newview/llstylemap.h
@@ -35,7 +35,7 @@
 // Lightweight class for holding and managing mappings between UUIDs and links.
 // Used (for example) to create clickable name links off of IM chat.
 
-typedef std::map<LLUUID, LLStyle::Params> style_map_t;
+typedef boost::unordered_map<LLUUID, LLStyle::Params> style_map_t;
 
 class LLStyleMap final : public LLSingleton<LLStyleMap>
 {
-- 
GitLab