From 76128c4357bc36acd54575153516c6d337fe4263 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Mon, 5 Aug 2019 12:04:29 -0700 Subject: SL-10566 Use vector for some high-traffic, low-item count containers instead of list. Provide method of storing joint indices sep from weight data for faster runtime processing. --- indra/newview/llcontrolavatar.cpp | 2 +- indra/newview/llviewerjoint.cpp | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp index 1e8ec4fe0f..6da7163f9f 100644 --- a/indra/newview/llcontrolavatar.cpp +++ b/indra/newview/llcontrolavatar.cpp @@ -255,7 +255,7 @@ void LLControlAvatar::recursiveScaleJoint(LLJoint* joint, F32 factor) { joint->setScale(factor * joint->getScale()); - for (LLJoint::child_list_t::iterator iter = joint->mChildren.begin(); + for (LLJoint::joints_t::iterator iter = joint->mChildren.begin(); iter != joint->mChildren.end(); ++iter) { LLJoint* child = *iter; diff --git a/indra/newview/llviewerjoint.cpp b/indra/newview/llviewerjoint.cpp index b7bd131246..a448a95904 100644 --- a/indra/newview/llviewerjoint.cpp +++ b/indra/newview/llviewerjoint.cpp @@ -141,11 +141,10 @@ U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy ) //---------------------------------------------------------------- // render children //---------------------------------------------------------------- - for (child_list_t::iterator iter = mChildren.begin(); - iter != mChildren.end(); ++iter) + for (LLJoint* j : mChildren) { - LLAvatarJoint* joint = dynamic_cast(*iter); - F32 jointLOD = joint->getLOD(); + LLAvatarJoint* joint = dynamic_cast(j); + F32 jointLOD = joint ? joint->getLOD() : 0; if (pixelArea >= jointLOD || sDisableLOD) { triangle_count += joint->render( pixelArea, TRUE, is_dummy ); -- cgit v1.2.3