diff options
Diffstat (limited to 'indra/llappearance/llavatarjoint.cpp')
-rw-r--r-- | indra/llappearance/llavatarjoint.cpp | 45 |
1 files changed, 18 insertions, 27 deletions
diff --git a/indra/llappearance/llavatarjoint.cpp b/indra/llappearance/llavatarjoint.cpp index a1d4fe6423..9300b08b7b 100644 --- a/indra/llappearance/llavatarjoint.cpp +++ b/indra/llappearance/llavatarjoint.cpp @@ -100,10 +100,9 @@ void LLAvatarJoint::setValid( BOOL valid, BOOL recursive ) //---------------------------------------------------------------- if (recursive) { - for (joints_t::iterator iter = mChildren.begin(); - iter != mChildren.end(); ++iter) + for (LLJoint* child : mChildren) { - LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(*iter); + LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(child); joint->setValid(valid, TRUE); } } @@ -118,10 +117,9 @@ void LLAvatarJoint::setSkeletonComponents( U32 comp, BOOL recursive ) mComponents = comp; if (recursive) { - for (joints_t::iterator iter = mChildren.begin(); - iter != mChildren.end(); ++iter) + for (auto child : mChildren) { - LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(*iter); + LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(child); joint->setSkeletonComponents(comp, recursive); } } @@ -133,10 +131,9 @@ void LLAvatarJoint::setVisible(BOOL visible, BOOL recursive) if (recursive) { - for (joints_t::iterator iter = mChildren.begin(); - iter != mChildren.end(); ++iter) + for (LLJoint* child : mChildren) { - LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(*iter); + LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(child); joint->setVisible(visible, recursive); } } @@ -144,30 +141,27 @@ void LLAvatarJoint::setVisible(BOOL visible, BOOL recursive) void LLAvatarJoint::updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 pixel_area) { - for (joints_t::iterator iter = mChildren.begin(); - iter != mChildren.end(); ++iter) + for (LLJoint* child : mChildren) { - LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(*iter); + LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(child); joint->updateFaceSizes(num_vertices, num_indices, pixel_area); } } void LLAvatarJoint::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind, bool terse_update) { - for (joints_t::iterator iter = mChildren.begin(); - iter != mChildren.end(); ++iter) + for (LLJoint* child : mChildren) { - LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(*iter); + LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(child); joint->updateFaceData(face, pixel_area, damp_wind, terse_update); } } void LLAvatarJoint::updateJointGeometry() { - for (joints_t::iterator iter = mChildren.begin(); - iter != mChildren.end(); ++iter) + for (LLJoint* child : mChildren) { - LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(*iter); + LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(child); joint->updateJointGeometry(); } } @@ -178,10 +172,9 @@ BOOL LLAvatarJoint::updateLOD(F32 pixel_area, BOOL activate) BOOL lod_changed = FALSE; BOOL found_lod = FALSE; - for (joints_t::iterator iter = mChildren.begin(); - iter != mChildren.end(); ++iter) + for (LLJoint* child : mChildren) { - LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(*iter); + LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(child); F32 jointLOD = joint->getLOD(); if (found_lod || jointLOD == DEFAULT_AVATAR_JOINT_LOD) @@ -207,10 +200,9 @@ BOOL LLAvatarJoint::updateLOD(F32 pixel_area, BOOL activate) void LLAvatarJoint::dump() { - for (joints_t::iterator iter = mChildren.begin(); - iter != mChildren.end(); ++iter) + for (LLJoint* child : mChildren) { - LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(*iter); + LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(child); joint->dump(); } } @@ -219,10 +211,9 @@ void LLAvatarJoint::dump() void LLAvatarJoint::setMeshesToChildren() { removeAllChildren(); - for (avatar_joint_mesh_list_t::iterator iter = mMeshParts.begin(); - iter != mMeshParts.end(); iter++) + for (LLAvatarJointMesh* mesh : mMeshParts) { - addChild((*iter)); + addChild(mesh); } } //----------------------------------------------------------------------------- |