From df1506383effdf68de88e70cba367dc1859d7113 Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Thu, 16 Nov 2023 10:08:26 -0500 Subject: [PATCH] Make unordered string keyed containers transparent --- indra/llappearance/llavatarappearance.h | 2 +- indra/llcommon/llerror.cpp | 2 +- indra/llcommon/llinitparam.h | 2 +- indra/llinventory/llsettingsbase.h | 4 ++-- indra/llmessage/llcachename.cpp | 2 +- indra/newview/llfloatermessagelog.h | 6 +++--- indra/newview/llviewermenu.cpp | 2 +- indra/newview/llviewerregion.h | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/indra/llappearance/llavatarappearance.h b/indra/llappearance/llavatarappearance.h index e2072557985..812e065aa57 100644 --- a/indra/llappearance/llavatarappearance.h +++ b/indra/llappearance/llavatarappearance.h @@ -142,7 +142,7 @@ class LLAvatarAppearance : public LLCharacter LLVector3 mHeadOffset; // current head position LLAvatarJoint *mRoot; - typedef boost::unordered_flat_map<std::string, LLJoint*> joint_map_t; + typedef boost::unordered_flat_map<std::string, LLJoint*, al::string_hash, std::equal_to<>> joint_map_t; joint_map_t mJointMap; typedef std::map<std::string, LLVector3> joint_state_map_t; diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index 636083787d8..1b2427c6334 100644 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -499,7 +499,7 @@ namespace } - typedef boost::unordered_flat_map<std::string, LLError::ELevel> LevelMap; + typedef boost::unordered_flat_map<std::string, LLError::ELevel, al::string_hash, std::equal_to<>> LevelMap; typedef std::vector<LLError::RecorderPtr> Recorders; typedef std::vector<LLError::CallSite*> CallSiteVector; diff --git a/indra/llcommon/llinitparam.h b/indra/llcommon/llinitparam.h index f219dce9fcd..25320fb683a 100644 --- a/indra/llcommon/llinitparam.h +++ b/indra/llcommon/llinitparam.h @@ -265,7 +265,7 @@ namespace LLInitParam private: struct Inaccessable{}; public: - typedef boost::unordered_flat_map<std::string, T> value_name_map_t; + typedef boost::unordered_flat_map<std::string, T, al::string_hash, std::equal_to<>> value_name_map_t; typedef Inaccessable name_t; typedef TypeValues<T> type_value_t; typedef ParamValue<typename LLTypeTags::Sorted<T>::value_t> param_value_t; diff --git a/indra/llinventory/llsettingsbase.h b/indra/llinventory/llsettingsbase.h index e420e4a8107..49a73d3b074 100644 --- a/indra/llinventory/llsettingsbase.h +++ b/indra/llinventory/llsettingsbase.h @@ -95,7 +95,7 @@ class LLSettingsBase : }; // Contains settings' names (map key), related shader id-key and default // value for revert in case we need to reset shader (no need to search each time) - typedef boost::unordered_flat_map<std::string, DefaultParam> parammapping_t; + typedef boost::unordered_flat_map<std::string, DefaultParam, al::string_hash, std::equal_to<>> parammapping_t; typedef PTR_NAMESPACE::shared_ptr<LLSettingsBase> ptr_t; @@ -329,7 +329,7 @@ class LLSettingsBase : LLSettingsBase(); LLSettingsBase(const LLSD setting); - typedef boost::unordered_flat_set<std::string> stringset_t; + typedef boost::unordered_flat_set<std::string, al::string_hash, std::equal_to<>> stringset_t; // combining settings objects. Customize for specific setting types virtual void lerpSettings(const LLSettingsBase &other, BlendFactor mix); diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp index 366ce793814..1c142502abc 100644 --- a/indra/llmessage/llcachename.cpp +++ b/indra/llmessage/llcachename.cpp @@ -185,7 +185,7 @@ typedef std::set<LLUUID> AskQueue; typedef std::list<PendingReply*> ReplyQueue; typedef std::map<LLUUID,U32> PendingQueue; typedef boost::unordered_flat_map<LLUUID, LLCacheNameEntry*> Cache; -typedef boost::unordered_flat_map<std::string, LLUUID> ReverseCache; +typedef boost::unordered_flat_map<std::string, LLUUID, al::string_hash, std::equal_to<>> ReverseCache; class LLCacheName::Impl { diff --git a/indra/newview/llfloatermessagelog.h b/indra/newview/llfloatermessagelog.h index a1f6edcf96b..ece7665ded2 100644 --- a/indra/newview/llfloatermessagelog.h +++ b/indra/newview/llfloatermessagelog.h @@ -37,7 +37,7 @@ class LLFloaterMessageLog; typedef boost::circular_buffer<LogPayload> LogPayloadList; typedef std::shared_ptr<LLEasyMessageLogEntry> FloaterMessageItem; typedef std::vector<FloaterMessageItem> FloaterMessageList; -typedef boost::container::flat_map<U64, FloaterMessageItem> HTTPConvoMap; +typedef boost::unordered_map<U64, FloaterMessageItem> HTTPConvoMap; class LLMessageLogFilter { @@ -51,8 +51,8 @@ class LLMessageLogFilter std::string asString() const { return mInputString; } //these should probably be unordered_sets - boost::container::flat_set<std::string> mPositiveNames; - boost::container::flat_set<std::string> mNegativeNames; + boost::unordered_flat_set<std::string, al::string_hash, std::equal_to<>> mPositiveNames; + boost::unordered_flat_set<std::string, al::string_hash, std::equal_to<>> mNegativeNames; protected: std::string mInputString; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index e7fbbf16888..49a8c52cd7a 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -164,7 +164,7 @@ using namespace LLAvatarAppearanceDefines; typedef LLPointer<LLViewerObject> LLViewerObjectPtr; -static boost::unordered_flat_map<std::string, LLStringExplicit> sDefaultItemLabels; +static boost::unordered_flat_map<std::string, LLStringExplicit, al::string_hash, std::equal_to<>> sDefaultItemLabels; BOOL enable_land_build(void*); BOOL enable_object_build(void*); diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index da7c3fbe6b5..7f575e993c3 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -696,7 +696,7 @@ class LLViewerRegion final : public LLCapabilityProvider // implements this inte std::vector<LLPointer<LLReflectionMap> > mReflectionMaps; mutable tex_matrix_t mWorldMapTiles; - boost::unordered_flat_set<std::string> mGodNames; + boost::unordered_flat_set<std::string, al::string_hash, std::equal_to<>> mGodNames; LLEasyMessageSender mMessageSender; using url_mapping_t = boost::unordered_multimap<std::string, std::string>; -- GitLab