From 22afbf999175707fb480a79b049390e5206675de Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 9 Jun 2025 21:55:10 +0200 Subject: [PATCH] Replace FSUUIDHash with LL implementation for unordered containers --- indra/llcommon/lluuid.h | 10 ---------- indra/newview/NACLantispam.h | 4 ++-- indra/newview/fsassetblacklist.h | 4 ++-- indra/newview/fsradar.h | 4 ++-- indra/newview/lggcontactsets.h | 4 ++-- indra/newview/llpanelgroupgeneral.h | 2 +- indra/newview/llperfstats.h | 2 +- 7 files changed, 10 insertions(+), 20 deletions(-) diff --git a/indra/llcommon/lluuid.h b/indra/llcommon/lluuid.h index 3690376e9f..abc795c641 100644 --- a/indra/llcommon/lluuid.h +++ b/indra/llcommon/lluuid.h @@ -246,14 +246,4 @@ inline size_t hash_value(const LLUUID& id) noexcept return (size_t)id.getDigest64(); } -// UUID hash calculation -struct FSUUIDHash -{ - inline size_t operator() (const LLUUID& id) const - { - return *reinterpret_cast(id.mData); - } -}; -// UUID hash calculation - #endif // LL_LLUUID_H diff --git a/indra/newview/NACLantispam.h b/indra/newview/NACLantispam.h index 74b0592d3d..96516c8b69 100644 --- a/indra/newview/NACLantispam.h +++ b/indra/newview/NACLantispam.h @@ -66,8 +66,8 @@ private: bool mBlocked; }; -typedef std::unordered_map spam_queue_entry_map_t; -typedef std::unordered_set collision_sound_set_t; +typedef std::unordered_map spam_queue_entry_map_t; +typedef std::unordered_set collision_sound_set_t; class NACLAntiSpamQueue { diff --git a/indra/newview/fsassetblacklist.h b/indra/newview/fsassetblacklist.h index 39ca880ae5..ea5392e96e 100644 --- a/indra/newview/fsassetblacklist.h +++ b/indra/newview/fsassetblacklist.h @@ -35,9 +35,9 @@ #include "llsingleton.h" #include "llassettype.h" -using blacklisted_uuid_container_t = std::unordered_set; +using blacklisted_uuid_container_t = std::unordered_set; using blacklist_type_map_t = std::map; -using blacklist_data_t = std::unordered_map; +using blacklist_data_t = std::unordered_map; class FSAssetBlacklist : public LLSingleton { diff --git a/indra/newview/fsradar.h b/indra/newview/fsradar.h index a3069839db..260617859d 100644 --- a/indra/newview/fsradar.h +++ b/indra/newview/fsradar.h @@ -63,7 +63,7 @@ class FSRadar virtual ~FSRadar(); public: - typedef std::unordered_map, FSUUIDHash> entry_map_t; + typedef std::unordered_map> entry_map_t; entry_map_t getRadarList() { return mEntryList; } void startTracking(const LLUUID& avatar_id); @@ -130,7 +130,7 @@ private: bool lastIgnore; }; - typedef std::unordered_map radarfields_map_t; + typedef std::unordered_map radarfields_map_t; radarfields_map_t mLastRadarSweep; entry_map_t mEntryList; diff --git a/indra/newview/lggcontactsets.h b/indra/newview/lggcontactsets.h index bed8cbdbbe..51983bcf2f 100644 --- a/indra/newview/lggcontactsets.h +++ b/indra/newview/lggcontactsets.h @@ -52,7 +52,7 @@ class LGGContactSets : public LLSingleton public: typedef std::vector string_vec_t; - typedef std::unordered_set uuid_set_t; + typedef std::unordered_set uuid_set_t; void loadFromDisk(); @@ -157,7 +157,7 @@ private: LLSD exportToLLSD(); void saveToDisk(); - typedef std::unordered_map uuid_map_t; + typedef std::unordered_map uuid_map_t; typedef std::map contact_set_map_t; contact_set_map_t mContactSets; diff --git a/indra/newview/llpanelgroupgeneral.h b/indra/newview/llpanelgroupgeneral.h index f0406cd56c..f878d4edb5 100644 --- a/indra/newview/llpanelgroupgeneral.h +++ b/indra/newview/llpanelgroupgeneral.h @@ -127,7 +127,7 @@ private: S32 sortMembersList(S32,const LLScrollListItem*,const LLScrollListItem*); LLGroupMgrGroupData::member_list_t::iterator mMemberProgress; - typedef std::unordered_map avatar_name_cache_connection_map_t; + typedef std::unordered_map avatar_name_cache_connection_map_t; avatar_name_cache_connection_map_t mAvatarNameCacheConnections; bool mPendingMemberUpdate; diff --git a/indra/newview/llperfstats.h b/indra/newview/llperfstats.h index 1e99fa343a..a1eb0348dc 100644 --- a/indra/newview/llperfstats.h +++ b/indra/newview/llperfstats.h @@ -245,7 +245,7 @@ namespace LLPerfStats static void updateMeanFrameTime(U64 tot_frame_time_raw); // StatsArray is a uint64_t for each possible statistic type. using StatsArray = std::array(LLPerfStats::StatType_t::STATS_COUNT)>; - using StatsMap = std::unordered_map; // + using StatsMap = std::unordered_map; // using StatsTypeMatrix = std::array(LLPerfStats::ObjType_t::OT_COUNT)>; using StatsSummaryArray = std::array(LLPerfStats::ObjType_t::OT_COUNT)>;