diff options
author | Ansariel Hiller <Ansariel@users.noreply.github.com> | 2025-04-25 19:52:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-25 20:52:38 +0300 |
commit | 10a324a1034c177b95545ac7ffaa6aa6abed65ff (patch) | |
tree | bfa78ec1ac88c92199339ed8b24ee3b5f50ecb4b /indra/newview/llvoavatarself.cpp | |
parent | 3e5f4fd0c4cb31d94c9255b46d3ff9e2f06d327b (diff) |
Reduce cost of joint lookups by reducing string allocations via use of std::string_view and heterogeneous map lookups (#3970)
Diffstat (limited to 'indra/newview/llvoavatarself.cpp')
-rw-r--r-- | indra/newview/llvoavatarself.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index f23af5afa4..2d2cc65a8d 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -695,17 +695,17 @@ void LLVOAvatarSelf::idleUpdate(LLAgent &agent, const F64 &time) } // virtual -LLJoint *LLVOAvatarSelf::getJoint(const std::string &name) +LLJoint* LLVOAvatarSelf::getJoint(std::string_view name) { std::lock_guard lock(mJointMapMutex); - LLJoint *jointp = NULL; + LLJoint* jointp = nullptr; jointp = LLVOAvatar::getJoint(name); if (!jointp && mScreenp) { jointp = mScreenp->findJoint(name); if (jointp) { - mJointMap[name] = jointp; + mJointMap[std::string(name)] = jointp; } } if (jointp && jointp != mScreenp && jointp != mRoot) |