summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerjoint.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerjoint.cpp')
-rw-r--r--indra/newview/llviewerjoint.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/newview/llviewerjoint.cpp b/indra/newview/llviewerjoint.cpp
index b7bd131246..9653e80b53 100644
--- a/indra/newview/llviewerjoint.cpp
+++ b/indra/newview/llviewerjoint.cpp
@@ -141,10 +141,11 @@ 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<LLAvatarJoint*>(*iter);
+ // LLViewerJoint is derived from LLAvatarJoint,
+ // all children of LLAvatarJoint are assumed to be LLAvatarJoint
+ LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(j);
F32 jointLOD = joint->getLOD();
if (pixelArea >= jointLOD || sDisableLOD)
{