From f096fc1965ddef85a7d61abbdd8ca6b0f5b45692 Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Sun, 5 Jul 2020 12:56:53 -0400 Subject: [PATCH] Change mJointMap to unordered for additional lookup speed --- indra/llappearance/llavatarappearance.h | 2 +- indra/newview/llvoavatar.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/llappearance/llavatarappearance.h b/indra/llappearance/llavatarappearance.h index 6a4dbf3726c..5aff01e859e 100644 --- a/indra/llappearance/llavatarappearance.h +++ b/indra/llappearance/llavatarappearance.h @@ -138,7 +138,7 @@ class LLAvatarAppearance : public LLCharacter LLVector3 mHeadOffset; // current head position LLAvatarJoint *mRoot; - typedef std::map<std::string, LLJoint*> joint_map_t; + typedef boost::unordered_map<std::string, LLJoint*> joint_map_t; joint_map_t mJointMap; typedef std::map<std::string, LLVector3> joint_state_map_t; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 69719a832d7..d875f360c91 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1652,12 +1652,12 @@ void LLVOAvatar::renderJoints() std::ostringstream ostr; std::ostringstream nullstr; - for (joint_map_t::iterator iter = mJointMap.begin(); iter != mJointMap.end(); ++iter) + for (const auto& joint_pair : mJointMap) { - LLJoint* jointp = iter->second; + LLJoint* jointp = joint_pair.second; if (!jointp) { - nullstr << iter->first << " is NULL" << std::endl; + nullstr << joint_pair.first << " is NULL" << std::endl; continue; } -- GitLab