diff options
Diffstat (limited to 'indra/llappearance')
-rw-r--r-- | indra/llappearance/llavatarappearance.cpp | 46 | ||||
-rw-r--r-- | indra/llappearance/llavatarappearance.h | 2 | ||||
-rw-r--r-- | indra/llappearance/llavatarappearancedefines.cpp | 4 | ||||
-rw-r--r-- | indra/llappearance/llavatarjoint.cpp | 16 | ||||
-rw-r--r-- | indra/llappearance/llavatarjointmesh.cpp | 2 | ||||
-rw-r--r-- | indra/llappearance/lldriverparam.cpp | 24 | ||||
-rw-r--r-- | indra/llappearance/lllocaltextureobject.cpp | 2 | ||||
-rw-r--r-- | indra/llappearance/llpolymesh.cpp | 4 | ||||
-rw-r--r-- | indra/llappearance/llpolymorph.cpp | 6 | ||||
-rw-r--r-- | indra/llappearance/llpolyskeletaldistortion.cpp | 8 | ||||
-rw-r--r-- | indra/llappearance/lltexglobalcolor.cpp | 2 | ||||
-rw-r--r-- | indra/llappearance/lltexlayer.cpp | 60 | ||||
-rw-r--r-- | indra/llappearance/lltexlayerparams.cpp | 2 | ||||
-rw-r--r-- | indra/llappearance/llwearable.cpp | 18 |
14 files changed, 98 insertions, 98 deletions
diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index 1f5e6aa98c..89a7c4589b 100644 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -214,7 +214,7 @@ void LLAvatarAppearance::initInstance() mRoot = createAvatarJoint(); mRoot->setName( "mRoot" ); - for (const auto& mesh_pair : sAvatarDictionary->getMeshEntries()) + for (const LLAvatarAppearanceDictionary::MeshEntries::value_type& mesh_pair : sAvatarDictionary->getMeshEntries()) { const EMeshIndex mesh_index = mesh_pair.first; const LLAvatarAppearanceDictionary::MeshEntry *mesh_dict = mesh_pair.second; @@ -258,7 +258,7 @@ void LLAvatarAppearance::initInstance() //------------------------------------------------------------------------- // associate baked textures with meshes //------------------------------------------------------------------------- - for (const auto& mesh_pair : sAvatarDictionary->getMeshEntries()) + for (const LLAvatarAppearanceDictionary::MeshEntries::value_type& mesh_pair : sAvatarDictionary->getMeshEntries()) { const EMeshIndex mesh_index = mesh_pair.first; const LLAvatarAppearanceDictionary::MeshEntry *mesh_dict = mesh_pair.second; @@ -266,7 +266,7 @@ void LLAvatarAppearance::initInstance() // Skip it if there's no associated baked texture. if (baked_texture_index == BAKED_NUM_INDICES) continue; - for (auto mesh : mMeshLOD[mesh_index]->mMeshParts) + for (LLAvatarJointMesh* mesh : mMeshLOD[mesh_index]->mMeshParts) { mBakedTextureDatas[(S32)baked_texture_index].mJointMeshes.push_back(mesh); } @@ -290,7 +290,7 @@ LLAvatarAppearance::~LLAvatarAppearance() delete_and_clear(mBakedTextureDatas[i].mTexLayerSet); mBakedTextureDatas[i].mJointMeshes.clear(); - for (auto masked_morph : mBakedTextureDatas[i].mMaskedMorphs) + for (LLMaskedMorph* masked_morph : mBakedTextureDatas[i].mMaskedMorphs) { delete masked_morph; } @@ -305,7 +305,7 @@ LLAvatarAppearance::~LLAvatarAppearance() std::for_each(mPolyMeshes.begin(), mPolyMeshes.end(), DeletePairedPointer()); mPolyMeshes.clear(); - for (auto joint : mMeshLOD) + for (LLAvatarJoint* joint : mMeshLOD) { std::for_each(joint->mMeshParts.begin(), joint->mMeshParts.end(), DeletePointer()); joint->mMeshParts.clear(); @@ -460,7 +460,7 @@ void LLAvatarAppearance::compareJointStateMaps(joint_state_map_t& last_state, if (!last_state.empty() && (last_state != curr_state)) { S32 diff_count = 0; - for (auto& pair : last_state) + for (joint_state_map_t::value_type& pair : last_state) { const std::string& key = pair.first; if (last_state[key] != curr_state[key]) @@ -672,7 +672,7 @@ BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent // setup children - for (auto child_info : info->mChildren) + for (LLAvatarBoneInfo* child_info : info->mChildren) { if (!setupBone(child_info, joint, volume_num, joint_num)) { @@ -725,7 +725,7 @@ BOOL LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info) S32 current_joint_num = 0; S32 current_volume_num = 0; - for (auto bone_info : info->mBoneInfoList) + for (LLAvatarBoneInfo* bone_info : info->mBoneInfoList) { if (!setupBone(bone_info, NULL, current_volume_num, current_joint_num)) { @@ -804,9 +804,9 @@ void LLAvatarAppearance::buildCharacter() //------------------------------------------------------------------------- // clear mesh data //------------------------------------------------------------------------- - for (auto joint : mMeshLOD) + for (LLAvatarJoint* joint : mMeshLOD) { - for (auto mesh : joint->mMeshParts) + for (LLAvatarJointMesh* mesh : joint->mMeshParts) { mesh->setMesh(NULL); } @@ -981,7 +981,7 @@ BOOL LLAvatarAppearance::loadAvatar() } // avatar_lad.xml : <morph_masks> - for (auto info : sAvatarXmlInfo->mMorphMaskInfoList) + for (LLAvatarXmlInfo::LLAvatarMorphInfo* info : sAvatarXmlInfo->mMorphMaskInfoList) { EBakedTextureIndex baked = sAvatarDictionary->findBakedByRegionName(info->mRegion); if (baked != BAKED_NUM_INDICES) @@ -1001,7 +1001,7 @@ BOOL LLAvatarAppearance::loadAvatar() loadLayersets(); // avatar_lad.xml : <driver_parameters> - for (auto info : sAvatarXmlInfo->mDriverInfoList) + for (LLDriverParamInfo* info : sAvatarXmlInfo->mDriverInfoList) { LLDriverParam* driver_param = new LLDriverParam( this ); if (driver_param->setInfo(info)) @@ -1034,7 +1034,7 @@ BOOL LLAvatarAppearance::loadSkeletonNode () mRoot->addChild( mSkeleton[0] ); // make meshes children before calling parent version of the function - for (auto joint : mMeshLOD) + for (LLAvatarJoint* joint : mMeshLOD) { joint->mUpdateXform = FALSE; joint->setMeshesToChildren(); @@ -1068,7 +1068,7 @@ BOOL LLAvatarAppearance::loadSkeletonNode () // SKELETAL DISTORTIONS { LLAvatarXmlInfo::skeletal_distortion_info_list_t::iterator iter; - for (auto visual_param_info : sAvatarXmlInfo->mSkeletalDistortionInfoList) + for (LLViewerVisualParamInfo* visual_param_info : sAvatarXmlInfo->mSkeletalDistortionInfoList) { LLPolySkeletalDistortionInfo *info = (LLPolySkeletalDistortionInfo*)visual_param_info; LLPolySkeletalDistortion *param = new LLPolySkeletalDistortion(this); @@ -1094,7 +1094,7 @@ BOOL LLAvatarAppearance::loadSkeletonNode () //----------------------------------------------------------------------------- BOOL LLAvatarAppearance::loadMeshNodes() { - for (const auto info : sAvatarXmlInfo->mMeshInfoList) + for (const LLAvatarXmlInfo::LLAvatarMeshInfo* info : sAvatarXmlInfo->mMeshInfoList) { const std::string &type = info->mType; S32 lod = info->mLOD; @@ -1107,7 +1107,7 @@ BOOL LLAvatarAppearance::loadMeshNodes() switch(lod) case 0: mesh = &mHairMesh0; */ - for (const auto& mesh_pair : sAvatarDictionary->getMeshEntries()) + for (const LLAvatarAppearanceDictionary::MeshEntries::value_type& mesh_pair : sAvatarDictionary->getMeshEntries()) { const EMeshIndex mesh_index = mesh_pair.first; const LLAvatarAppearanceDictionary::MeshEntry *mesh_dict = mesh_pair.second; @@ -1178,7 +1178,7 @@ BOOL LLAvatarAppearance::loadMeshNodes() mesh->setMesh( poly_mesh ); mesh->setLOD( info->mMinPixelArea ); - for (const auto& info_pair : info->mPolyMorphTargetInfoList) + for (const LLAvatarXmlInfo::LLAvatarMeshInfo::morph_info_pair_t& info_pair : info->mPolyMorphTargetInfoList) { LLPolyMorphTarget *param = new LLPolyMorphTarget(mesh->getMesh()); if (!param->setInfo((LLPolyMorphTargetInfo*)info_pair.first)) @@ -1211,7 +1211,7 @@ BOOL LLAvatarAppearance::loadMeshNodes() BOOL LLAvatarAppearance::loadLayersets() { BOOL success = TRUE; - for (auto layerset_info : sAvatarXmlInfo->mLayerInfoList) + for (LLTexLayerSetInfo* layerset_info : sAvatarXmlInfo->mLayerInfoList) { if (isSelf()) { @@ -1228,7 +1228,7 @@ BOOL LLAvatarAppearance::loadLayersets() // scan baked textures and associate the layerset with the appropriate one EBakedTextureIndex baked_index = BAKED_NUM_INDICES; - for (const auto& baked_pair : sAvatarDictionary->getBakedTextures()) + for (const LLAvatarAppearanceDictionary::BakedTextures::value_type& baked_pair : sAvatarDictionary->getBakedTextures()) { const LLAvatarAppearanceDictionary::BakedEntry *baked_dict = baked_pair.second; if (layer_set->isBodyRegion(baked_dict->mName)) @@ -1249,7 +1249,7 @@ BOOL LLAvatarAppearance::loadLayersets() } // scan morph masks and let any affected layers know they have an associated morph - for (auto morph : mBakedTextureDatas[baked_index].mMaskedMorphs) + for (LLMaskedMorph* morph : mBakedTextureDatas[baked_index].mMaskedMorphs) { LLTexLayerInterface* layer = layer_set->findLayerByName(morph->mLayer); if (layer) @@ -1692,7 +1692,7 @@ void LLAvatarAppearance::makeJointAliases(LLAvatarBoneInfo *bone_info) boost::char_separator<char> sep(" "); boost::tokenizer<boost::char_separator<char> > tok(aliases, sep); - for(auto& i : tok) + for(const std::string& i : tok) { if ( mJointAliasMap.find(i) != mJointAliasMap.end() ) { @@ -1713,13 +1713,13 @@ const LLAvatarAppearance::joint_alias_map_t& LLAvatarAppearance::getJointAliases if (mJointAliasMap.empty()) { - for (auto bone_info : sAvatarSkeletonInfo->mBoneInfoList) + for (LLAvatarBoneInfo* bone_info : sAvatarSkeletonInfo->mBoneInfoList) { //LLAvatarBoneInfo *bone_info = *iter; makeJointAliases(bone_info); } - for (auto info : sAvatarXmlInfo->mAttachmentInfoList) + for (LLAvatarXmlInfo::LLAvatarAttachmentInfo* info : sAvatarXmlInfo->mAttachmentInfoList) { std::string bone_name = info->mName; diff --git a/indra/llappearance/llavatarappearance.h b/indra/llappearance/llavatarappearance.h index cb1cbc11a6..e3444efcf6 100644 --- a/indra/llappearance/llavatarappearance.h +++ b/indra/llappearance/llavatarappearance.h @@ -387,7 +387,7 @@ protected: LLAvatarMeshInfo() : mLOD(0), mMinPixelArea(.1f) {} ~LLAvatarMeshInfo() { - for (auto& pair : mPolyMorphTargetInfoList) + for (morph_info_list_t::value_type& pair : mPolyMorphTargetInfoList) { delete pair.first; } diff --git a/indra/llappearance/llavatarappearancedefines.cpp b/indra/llappearance/llavatarappearancedefines.cpp index 5ab3f92b31..8759c387e8 100644 --- a/indra/llappearance/llavatarappearancedefines.cpp +++ b/indra/llappearance/llavatarappearancedefines.cpp @@ -183,14 +183,14 @@ LLAvatarAppearanceDictionary::~LLAvatarAppearanceDictionary() // map it to the baked texture. void LLAvatarAppearanceDictionary::createAssociations() { - for (const auto& baked_pair : mBakedTextures) + for (BakedTextures::value_type& baked_pair : mBakedTextures) { const EBakedTextureIndex baked_index = baked_pair.first; const BakedEntry *dict = baked_pair.second; // For each texture that this baked texture index affects, associate those textures // with this baked texture index. - for (const auto local_texture_index : dict->mLocalTextures) + for (const ETextureIndex local_texture_index : dict->mLocalTextures) { mTextures[local_texture_index]->mIsUsedByBakedTexture = true; mTextures[local_texture_index]->mBakedTextureIndex = baked_index; diff --git a/indra/llappearance/llavatarjoint.cpp b/indra/llappearance/llavatarjoint.cpp index 82050605e1..9300b08b7b 100644 --- a/indra/llappearance/llavatarjoint.cpp +++ b/indra/llappearance/llavatarjoint.cpp @@ -100,7 +100,7 @@ void LLAvatarJoint::setValid( BOOL valid, BOOL recursive ) //---------------------------------------------------------------- if (recursive) { - for (auto child : mChildren) + for (LLJoint* child : mChildren) { LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(child); joint->setValid(valid, TRUE); @@ -131,7 +131,7 @@ void LLAvatarJoint::setVisible(BOOL visible, BOOL recursive) if (recursive) { - for (auto child : mChildren) + for (LLJoint* child : mChildren) { LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(child); joint->setVisible(visible, recursive); @@ -141,7 +141,7 @@ void LLAvatarJoint::setVisible(BOOL visible, BOOL recursive) void LLAvatarJoint::updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 pixel_area) { - for (auto child : mChildren) + for (LLJoint* child : mChildren) { LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(child); joint->updateFaceSizes(num_vertices, num_indices, pixel_area); @@ -150,7 +150,7 @@ void LLAvatarJoint::updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 pix void LLAvatarJoint::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind, bool terse_update) { - for (auto child : mChildren) + for (LLJoint* child : mChildren) { LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(child); joint->updateFaceData(face, pixel_area, damp_wind, terse_update); @@ -159,7 +159,7 @@ void LLAvatarJoint::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind, void LLAvatarJoint::updateJointGeometry() { - for (auto child : mChildren) + for (LLJoint* child : mChildren) { LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(child); joint->updateJointGeometry(); @@ -172,7 +172,7 @@ BOOL LLAvatarJoint::updateLOD(F32 pixel_area, BOOL activate) BOOL lod_changed = FALSE; BOOL found_lod = FALSE; - for (auto child : mChildren) + for (LLJoint* child : mChildren) { LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(child); F32 jointLOD = joint->getLOD(); @@ -200,7 +200,7 @@ BOOL LLAvatarJoint::updateLOD(F32 pixel_area, BOOL activate) void LLAvatarJoint::dump() { - for (auto child : mChildren) + for (LLJoint* child : mChildren) { LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(child); joint->dump(); @@ -211,7 +211,7 @@ void LLAvatarJoint::dump() void LLAvatarJoint::setMeshesToChildren() { removeAllChildren(); - for (auto mesh : mMeshParts) + for (LLAvatarJointMesh* mesh : mMeshParts) { addChild(mesh); } diff --git a/indra/llappearance/llavatarjointmesh.cpp b/indra/llappearance/llavatarjointmesh.cpp index aa1a216678..ed39f78d28 100644 --- a/indra/llappearance/llavatarjointmesh.cpp +++ b/indra/llappearance/llavatarjointmesh.cpp @@ -379,7 +379,7 @@ void LLAvatarJointMesh::setupJoint(LLAvatarJoint* current_joint) } // depth-first traversal - for (auto joint : current_joint->mChildren) + for (LLJoint* joint : current_joint->mChildren) { LLAvatarJoint* child_joint = (LLAvatarJoint*)joint; setupJoint(child_joint); diff --git a/indra/llappearance/lldriverparam.cpp b/indra/llappearance/lldriverparam.cpp index 7845647281..f46d0324a5 100644 --- a/indra/llappearance/lldriverparam.cpp +++ b/indra/llappearance/lldriverparam.cpp @@ -102,7 +102,7 @@ void LLDriverParamInfo::toStream(std::ostream &out) LLViewerVisualParamInfo::toStream(out); out << "driver" << "\t"; out << mDrivenInfoList.size() << "\t"; - for (auto& driven : mDrivenInfoList) + for (LLDrivenEntryInfo& driven : mDrivenInfoList) { out << driven.mDrivenID << "\t"; } @@ -120,7 +120,7 @@ void LLDriverParamInfo::toStream(std::ostream &out) if(mDriverParam && mDriverParam->getAvatarAppearance()->isSelf() && mDriverParam->getAvatarAppearance()->isValid()) { - for (auto& driven : mDrivenInfoList) + for (LLDrivenEntryInfo& driven : mDrivenInfoList) { LLViewerVisualParam *param = (LLViewerVisualParam*)mDriverParam->getAvatarAppearance()->getVisualParam(driven.mDrivenID); @@ -230,7 +230,7 @@ void LLDriverParam::setWeight(F32 weight) //-------|----|-------|----|-------> driver // | min1 max1 max2 min2 - for(auto& driven : mDriven) + for(LLDrivenEntry& driven : mDriven) { LLDrivenEntry* drivenp = &driven; LLDrivenEntryInfo* info = drivenp->mInfo; @@ -303,7 +303,7 @@ void LLDriverParam::setWeight(F32 weight) F32 LLDriverParam::getTotalDistortion() { F32 sum = 0.f; - for(auto& driven : mDriven) + for(LLDrivenEntry& driven : mDriven) { sum += driven.mParam->getTotalDistortion(); } @@ -317,7 +317,7 @@ const LLVector4a &LLDriverParam::getAvgDistortion() LLVector4a sum; sum.clear(); S32 count = 0; - for(auto& driven : mDriven) + for(LLDrivenEntry& driven : mDriven) { sum.add(driven.mParam->getAvgDistortion()); count++; @@ -331,7 +331,7 @@ const LLVector4a &LLDriverParam::getAvgDistortion() F32 LLDriverParam::getMaxDistortion() { F32 max = 0.f; - for(auto& driven : mDriven) + for(LLDrivenEntry& driven : mDriven) { F32 param_max = driven.mParam->getMaxDistortion(); if( param_max > max ) @@ -348,7 +348,7 @@ LLVector4a LLDriverParam::getVertexDistortion(S32 index, LLPolyMesh *poly_mesh) { LLVector4a sum; sum.clear(); - for(auto& driven : mDriven) + for(LLDrivenEntry& driven : mDriven) { sum.add(driven.mParam->getVertexDistortion(index, poly_mesh)); } @@ -359,7 +359,7 @@ const LLVector4a* LLDriverParam::getFirstDistortion(U32 *index, LLPolyMesh **pol { mCurrentDistortionParam = NULL; const LLVector4a* v = NULL; - for(auto& driven : mDriven) + for(LLDrivenEntry& driven : mDriven) { v = driven.mParam->getFirstDistortion(index, poly_mesh); if( v ) @@ -441,7 +441,7 @@ void LLDriverParam::setAnimationTarget( F32 target_value) { LLVisualParam::setAnimationTarget(target_value); - for(auto& driven : mDriven) + for(LLDrivenEntry& driven : mDriven) { LLDrivenEntry* drivenp = &driven; F32 driven_weight = getDrivenWeight(drivenp, mTargetWeight); @@ -459,7 +459,7 @@ void LLDriverParam::stopAnimating() { LLVisualParam::stopAnimating(); - for(auto& driven : mDriven) + for(LLDrivenEntry& driven : mDriven) { driven.mParam->setAnimating(FALSE); } @@ -469,7 +469,7 @@ void LLDriverParam::stopAnimating() BOOL LLDriverParam::linkDrivenParams(visual_param_mapper mapper, BOOL only_cross_params) { BOOL success = TRUE; - for (auto& driven_info : getInfo()->mDrivenInfoList) + for (LLDrivenEntryInfo& driven_info : getInfo()->mDrivenInfoList) { S32 driven_id = driven_info.mDrivenID; @@ -513,7 +513,7 @@ void LLDriverParam::updateCrossDrivenParams(LLWearableType::EType driven_type) bool needs_update = (getWearableType()==driven_type); // if the driver has a driven entry for the passed-in wearable type, we need to refresh the value - for(auto& driven : mDriven) + for(LLDrivenEntry& driven : mDriven) { if (driven.mParam && driven.mParam->getCrossWearable() && driven.mParam->getWearableType() == driven_type) { diff --git a/indra/llappearance/lllocaltextureobject.cpp b/indra/llappearance/lllocaltextureobject.cpp index b66b51f4e4..ac8a1abb2d 100644 --- a/indra/llappearance/lllocaltextureobject.cpp +++ b/indra/llappearance/lllocaltextureobject.cpp @@ -95,7 +95,7 @@ LLTexLayer* LLLocalTextureObject::getTexLayer(U32 index) const LLTexLayer* LLLocalTextureObject::getTexLayer(const std::string &name) { - for(auto layer : mTexLayers) + for(LLTexLayer* layer : mTexLayers) { if (layer->getName().compare(name) == 0) { diff --git a/indra/llappearance/llpolymesh.cpp b/indra/llappearance/llpolymesh.cpp index d0f0199d61..dab14851c8 100644 --- a/indra/llappearance/llpolymesh.cpp +++ b/indra/llappearance/llpolymesh.cpp @@ -890,7 +890,7 @@ void LLPolyMesh::dumpDiagInfo() LL_INFOS() << "-----------------------------------------------------" << LL_ENDL; // print each loaded mesh, and it's memory usage - for(const auto& mesh_pair : sGlobalSharedMeshList) + for(const LLPolyMeshSharedDataTable::value_type& mesh_pair : sGlobalSharedMeshList) { const std::string& mesh_name = mesh_pair.first; LLPolyMeshSharedData* mesh = mesh_pair.second; @@ -996,7 +996,7 @@ LLPolyMorphData* LLPolyMesh::getMorphData(const std::string& morph_name) { if (!mSharedData) return NULL; - for (auto morph_data : mSharedData->mMorphData) + for (LLPolyMorphData* morph_data : mSharedData->mMorphData) { if (morph_data->getName() == morph_name) { diff --git a/indra/llappearance/llpolymorph.cpp b/indra/llappearance/llpolymorph.cpp index 1f83f748a1..ca3ecda8c3 100644 --- a/indra/llappearance/llpolymorph.cpp +++ b/indra/llappearance/llpolymorph.cpp @@ -364,7 +364,7 @@ BOOL LLPolyMorphTarget::setInfo(LLPolyMorphTargetInfo* info) LLAvatarAppearance* avatarp = mMesh->getAvatar(); LLPolyMorphTargetInfo::volume_info_list_t::iterator iter; - for (auto& volume_info : getInfo()->mVolumeInfoList) + for (LLPolyVolumeMorphInfo& volume_info : getInfo()->mVolumeInfoList) { for (S32 i = 0; i < avatarp->mNumCollisionVolumes; i++) { @@ -640,7 +640,7 @@ void LLPolyMorphTarget::apply( ESex avatar_sex ) } // now apply volume changes - for(auto& volume_morph : mVolumeMorphs) + for(LLPolyVolumeMorph& volume_morph : mVolumeMorphs) { LLVector3 scale_delta = volume_morph.mScale * delta_weight; LLVector3 pos_delta = volume_morph.mPos * delta_weight; @@ -733,7 +733,7 @@ void LLPolyMorphTarget::applyMask(U8 *maskTextureData, S32 width, S32 height, S3 void LLPolyMorphTarget::applyVolumeChanges(F32 delta_weight) { // now apply volume changes - for(auto& volume_morph : mVolumeMorphs) + for(LLPolyVolumeMorph& volume_morph : mVolumeMorphs) { LLVector3 scale_delta = volume_morph.mScale * delta_weight; LLVector3 pos_delta = volume_morph.mPos * delta_weight; diff --git a/indra/llappearance/llpolyskeletaldistortion.cpp b/indra/llappearance/llpolyskeletaldistortion.cpp index e1460b68de..8712cdd286 100644 --- a/indra/llappearance/llpolyskeletaldistortion.cpp +++ b/indra/llappearance/llpolyskeletaldistortion.cpp @@ -144,7 +144,7 @@ BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info) setWeight(getDefaultWeight()); LLPolySkeletalDistortionInfo::bone_info_list_t::iterator iter; - for (auto& bone_info : getInfo()->mBoneInfoList) + for (LLPolySkeletalBoneInfo& bone_info : getInfo()->mBoneInfoList) { LLJoint* joint = mAvatar->getJoint(bone_info.mBoneName); if (!joint) @@ -159,7 +159,7 @@ BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info) mJointScales[joint] = bone_info.mScaleDeformation; // apply to children that need to inherit it - for (auto joint : joint->mChildren) + for (LLJoint* joint : joint->mChildren) { LLAvatarJoint* child_joint = (LLAvatarJoint*)joint; if (child_joint->inheritScale()) @@ -194,7 +194,7 @@ void LLPolySkeletalDistortion::apply( ESex avatar_sex ) LLJoint* joint; - for (auto& scale_pair : mJointScales) + for (joint_vec_map_t::value_type& scale_pair : mJointScales) { joint = scale_pair.first; LLVector3 newScale = joint->getScale(); @@ -213,7 +213,7 @@ void LLPolySkeletalDistortion::apply( ESex avatar_sex ) joint->setScale(newScale, true); } - for (auto& offset_pair : mJointOffsets) + for (joint_vec_map_t::value_type& offset_pair : mJointOffsets) { joint = offset_pair.first; LLVector3 newPosition = joint->getPosition(); diff --git a/indra/llappearance/lltexglobalcolor.cpp b/indra/llappearance/lltexglobalcolor.cpp index 611b87a7cf..75815482c9 100644 --- a/indra/llappearance/lltexglobalcolor.cpp +++ b/indra/llappearance/lltexglobalcolor.cpp @@ -55,7 +55,7 @@ BOOL LLTexGlobalColor::setInfo(LLTexGlobalColorInfo *info) //mID = info->mID; // No ID mParamGlobalColorList.reserve(mInfo->mParamColorInfoList.size()); - for (auto color_info : mInfo->mParamColorInfoList) + for (LLTexLayerParamColorInfo* color_info : mInfo->mParamColorInfoList) { LLTexParamGlobalColor* param_color = new LLTexParamGlobalColor(this); if (!param_color->setInfo(color_info, TRUE)) diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp index 68a021eb9a..6f23b2e04c 100644 --- a/indra/llappearance/lltexlayer.cpp +++ b/indra/llappearance/lltexlayer.cpp @@ -241,7 +241,7 @@ BOOL LLTexLayerSetInfo::parseXml(LLXmlTreeNode* node) void LLTexLayerSetInfo::createVisualParams(LLAvatarAppearance *appearance) { //layer_info_list_t mLayerInfoList; - for (auto layer_info : mLayerInfoList) + for (LLTexLayerInfo* layer_info : mLayerInfoList) { layer_info->createVisualParams(appearance); } @@ -284,7 +284,7 @@ BOOL LLTexLayerSet::setInfo(const LLTexLayerSetInfo *info) //mID = info->mID; // No ID mLayerList.reserve(info->mLayerInfoList.size()); - for (auto layer_info : info->mLayerInfoList) + for (LLTexLayerInfo* layer_info : info->mLayerInfoList) { LLTexLayerInterface *layer = NULL; if (layer_info->isUserSettable()) @@ -343,11 +343,11 @@ BOOL LLTexLayerSet::parseData(LLXmlTreeNode* node) void LLTexLayerSet::deleteCaches() { - for(auto layer : mLayerList) + for(LLTexLayerInterface* layer : mLayerList) { layer->deleteCaches(); } - for (auto layer : mMaskLayerList) + for (LLTexLayerInterface* layer : mMaskLayerList) { layer->deleteCaches(); } @@ -361,7 +361,7 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height, LLRenderTarget* if (mMaskLayerList.size() > 0) { - for (auto layer : mMaskLayerList) + for (LLTexLayerInterface* layer : mMaskLayerList) { if (layer->isInvisibleAlphaMask()) { @@ -391,7 +391,7 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height, LLRenderTarget* if (mIsVisible) { // composite color layers - for(auto layer : mLayerList) + for(LLTexLayerInterface* layer : mLayerList) { if (layer->getRenderPass() == LLTexLayer::RP_COLOR) { @@ -464,7 +464,7 @@ void LLTexLayerSet::gatherMorphMaskAlpha(U8 *data, S32 origin_x, S32 origin_y, S LL_PROFILE_ZONE_SCOPED; memset(data, 255, width * height); - for(auto layer : mLayerList) + for(LLTexLayerInterface* layer : mLayerList) { layer->gatherAlphaMasks(data, origin_x, origin_y, width, height, bound_target); } @@ -516,7 +516,7 @@ void LLTexLayerSet::renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height, if (mMaskLayerList.size() > 0) { gGL.setSceneBlendType(LLRender::BT_MULT_ALPHA); - for (auto layer : mMaskLayerList) + for (LLTexLayerInterface* layer : mMaskLayerList) { gGL.flush(); layer->blendAlphaTexture(x,y,width, height); @@ -538,7 +538,7 @@ void LLTexLayerSet::applyMorphMask(U8* tex_data, S32 width, S32 height, S32 num_ BOOL LLTexLayerSet::isMorphValid() const { - for(const auto layer : mLayerList) + for(const LLTexLayerInterface* layer : mLayerList) { if (layer && !layer->isMorphValid()) { @@ -550,7 +550,7 @@ BOOL LLTexLayerSet::isMorphValid() const void LLTexLayerSet::invalidateMorphMasks() { - for(auto layer : mLayerList) + for(LLTexLayerInterface* layer : mLayerList) { if (layer) { @@ -648,7 +648,7 @@ BOOL LLTexLayerInfo::parseXml(LLXmlTreeNode* node) /* if ("upper_shirt" == local_texture_name) mLocalTexture = TEX_UPPER_SHIRT; */ mLocalTexture = TEX_NUM_INDICES; - for (const auto& dict_pair : LLAvatarAppearance::getDictionary()->getTextures()) + for (const LLAvatarAppearanceDictionary::Textures::value_type& dict_pair : LLAvatarAppearance::getDictionary()->getTextures()) { const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = dict_pair.second; if (local_texture_name == texture_dict->mName) @@ -720,7 +720,7 @@ BOOL LLTexLayerInfo::parseXml(LLXmlTreeNode* node) BOOL LLTexLayerInfo::createVisualParams(LLAvatarAppearance *appearance) { BOOL success = TRUE; - for (auto color_info : mParamColorInfoList) + for (LLTexLayerParamColorInfo* color_info : mParamColorInfoList) { LLTexLayerParamColor* param_color = new LLTexLayerParamColor(appearance); if (!param_color->setInfo(color_info, TRUE)) @@ -731,7 +731,7 @@ BOOL LLTexLayerInfo::createVisualParams(LLAvatarAppearance *appearance) } } - for (auto alpha_info : mParamAlphaInfoList) + for (LLTexLayerParamAlphaInfo* alpha_info : mParamAlphaInfoList) { LLTexLayerParamAlpha* param_alpha = new LLTexLayerParamAlpha(appearance); if (!param_alpha->setInfo(alpha_info, TRUE)) @@ -775,7 +775,7 @@ BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearab //mID = info->mID; // No ID mParamColorList.reserve(mInfo->mParamColorInfoList.size()); - for (auto color_info : mInfo->mParamColorInfoList) + for (LLTexLayerParamColorInfo* color_info : mInfo->mParamColorInfoList) { LLTexLayerParamColor* param_color; if (!wearable) @@ -800,7 +800,7 @@ BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearab } mParamAlphaList.reserve(mInfo->mParamAlphaInfoList.size()); - for (auto alpha_info : mInfo->mParamAlphaInfoList) + for (LLTexLayerParamAlphaInfo* alpha_info : mInfo->mParamAlphaInfoList) { LLTexLayerParamAlpha* param_alpha; if (!wearable) @@ -849,7 +849,7 @@ LLWearableType::EType LLTexLayerInterface::getWearableType() const { LLWearableType::EType type = LLWearableType::WT_INVALID; - for (auto param : mParamColorList) + for (LLTexLayerParamColor* param : mParamColorList) { if (param) { @@ -865,7 +865,7 @@ LLWearableType::EType LLTexLayerInterface::getWearableType() const } } - for (auto param : mParamAlphaList) + for (LLTexLayerParamAlpha* param : mParamAlphaList) { if (param) { @@ -909,14 +909,14 @@ void LLTexLayerInterface::invalidateMorphMasks() LLViewerVisualParam* LLTexLayerInterface::getVisualParamPtr(S32 index) const { LLViewerVisualParam *result = NULL; - for (auto param : mParamColorList) + for (LLTexLayerParamColor* param : mParamColorList) { if (param->getID() == index) { result = param; } } - for (auto param : mParamAlphaList) + for (LLTexLayerParamAlpha* param : mParamAlphaList) { if (param->getID() == index) { @@ -965,7 +965,7 @@ LLTexLayer::~LLTexLayer() //std::for_each(mParamAlphaList.begin(), mParamAlphaList.end(), DeletePointer()); //std::for_each(mParamColorList.begin(), mParamColorList.end(), DeletePointer()); - for(auto& alpha_pair : mAlphaCache) + for (alpha_cache_t::value_type& alpha_pair : mAlphaCache) { U8* alpha_data = alpha_pair.second; ll_aligned_free_32(alpha_data); @@ -991,7 +991,7 @@ BOOL LLTexLayer::setInfo(const LLTexLayerInfo* info, LLWearable* wearable ) //static void LLTexLayer::calculateTexLayerColor(const param_color_list_t ¶m_list, LLColor4 &net_color) { - for (const auto param : param_list) + for (const LLTexLayerParamColor* param : param_list) { LLColor4 param_net = param->getNetColor(); const LLTexLayerParamColorInfo *info = (LLTexLayerParamColorInfo *)param->getInfo(); @@ -1017,7 +1017,7 @@ void LLTexLayer::calculateTexLayerColor(const param_color_list_t ¶m_list, LL /*virtual*/ void LLTexLayer::deleteCaches() { // Only need to delete caches for alpha params. Color params don't hold extra memory - for (auto param : mParamAlphaList) + for (LLTexLayerParamAlpha* param : mParamAlphaList) { param->deleteCaches(); } @@ -1192,7 +1192,7 @@ const U8* LLTexLayer::getAlphaData() const const LLUUID& uuid = getUUID(); alpha_mask_crc.update((U8*)(&uuid.mData), UUID_BYTES); - for (const auto param : mParamAlphaList) + for (const LLTexLayerParamAlpha* param : mParamAlphaList) { // MULTI-WEARABLE: verify visual parameters used here F32 param_weight = param->getWeight(); @@ -1330,7 +1330,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC // Accumulate alphas LLGLSNoAlphaTest gls_no_alpha_test; gGL.color4f( 1.f, 1.f, 1.f, 1.f ); - for (auto param : mParamAlphaList) + for (LLTexLayerParamAlpha* param : mParamAlphaList) { success &= param->render( x, y, width, height ); if (!success && !force_render) @@ -1405,7 +1405,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC const LLUUID& uuid = getUUID(); alpha_mask_crc.update((U8*)(&uuid.mData), UUID_BYTES); - for (const auto param : mParamAlphaList) + for (const LLTexLayerParamAlpha* param : mParamAlphaList) { F32 param_weight = param->getWeight(); alpha_mask_crc.update((U8*)¶m_weight, sizeof(F32)); @@ -1646,7 +1646,7 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) const BOOL success = TRUE; updateWearableCache(); - for (auto wearable : mWearableCache) + for (LLWearable* wearable : mWearableCache) { LLLocalTextureObject *lto = NULL; LLTexLayer *layer = NULL; @@ -1746,14 +1746,14 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) const //----------------------------------------------------------------------------- LLTexLayerInterface* LLTexLayerSet::findLayerByName(const std::string& name) { - for (auto layer : mLayerList) + for (LLTexLayerInterface* layer : mLayerList) { if (layer->getName() == name) { return layer; } } - for (auto layer : mMaskLayerList) + for (LLTexLayerInterface* layer : mMaskLayerList) { if (layer->getName() == name) { @@ -1766,7 +1766,7 @@ LLTexLayerInterface* LLTexLayerSet::findLayerByName(const std::string& name) void LLTexLayerSet::cloneTemplates(LLLocalTextureObject *lto, LLAvatarAppearanceDefines::ETextureIndex tex_index, LLWearable *wearable) { // initialize all texlayers with this texture type for this LTO - for(auto layer : mLayerList) + for(LLTexLayerInterface* layer : mLayerList) { LLTexLayerTemplate* layer_template = (LLTexLayerTemplate*)layer; if (layer_template->getInfo()->getLocalTexture() == (S32)tex_index) @@ -1774,7 +1774,7 @@ void LLTexLayerSet::cloneTemplates(LLLocalTextureObject *lto, LLAvatarAppearance lto->addTexLayer(layer_template, wearable); } } - for(auto layer : mMaskLayerList) + for(LLTexLayerInterface* layer : mMaskLayerList) { LLTexLayerTemplate* layer_template = (LLTexLayerTemplate*)layer; if (layer_template->getInfo()->getLocalTexture() == (S32)tex_index) diff --git a/indra/llappearance/lltexlayerparams.cpp b/indra/llappearance/lltexlayerparams.cpp index 549b1802a7..a288c8955a 100644 --- a/indra/llappearance/lltexlayerparams.cpp +++ b/indra/llappearance/lltexlayerparams.cpp @@ -103,7 +103,7 @@ void LLTexLayerParamAlpha::getCacheByteCount(S32* gl_bytes) { *gl_bytes = 0; - for (auto instance : sInstances) + for (LLTexLayerParamAlpha* instance : sInstances) { LLGLTexture* tex = instance->mCachedProcessedTexture; if (tex) diff --git a/indra/llappearance/llwearable.cpp b/indra/llappearance/llwearable.cpp index 6889304410..10d668d0af 100644 --- a/indra/llappearance/llwearable.cpp +++ b/indra/llappearance/llwearable.cpp @@ -60,7 +60,7 @@ LLWearable::LLWearable() // virtual LLWearable::~LLWearable() { - for (auto& vp_pair : mVisualParamIndexMap) + for (visual_param_index_map_t::value_type& vp_pair : mVisualParamIndexMap) { LLVisualParam* vp = vp_pair.second; vp->clearNextParam(); @@ -122,7 +122,7 @@ BOOL LLWearable::exportStream( std::ostream& output_stream ) const // parameters output_stream << "parameters " << mVisualParamIndexMap.size() << "\n"; - for (auto& vp_pair : mVisualParamIndexMap) + for (const visual_param_index_map_t::value_type& vp_pair : mVisualParamIndexMap) { S32 param_id = vp_pair.first; const LLVisualParam* param = vp_pair.second; @@ -133,7 +133,7 @@ BOOL LLWearable::exportStream( std::ostream& output_stream ) const // texture entries output_stream << "textures " << mTEMap.size() << "\n"; - for (auto& te_pair : mTEMap) + for (const te_map_t::value_type& te_pair : mTEMap) { S32 te = te_pair.first; const LLUUID& image_id = te_pair.second->getID(); @@ -158,7 +158,7 @@ void LLWearable::createVisualParams(LLAvatarAppearance *avatarp) } // resync driver parameters to point to the newly cloned driven parameters - for (auto& param_pair : mVisualParamIndexMap) + for (visual_param_index_map_t::value_type& param_pair : mVisualParamIndexMap) { LLVisualParam* param = param_pair.second; LLVisualParam*(LLWearable::*wearable_function)(S32)const = &LLWearable::getVisualParam; @@ -519,7 +519,7 @@ std::vector<LLLocalTextureObject*> LLWearable::getLocalTextureListSeq() { std::vector<LLLocalTextureObject*> result; - for(auto& te_pair : mTEMap) + for(te_map_t::value_type& te_pair : mTEMap) { LLLocalTextureObject* lto = te_pair.second; result.push_back(lto); @@ -543,7 +543,7 @@ void LLWearable::revertValues() //update saved settings so wearable is no longer dirty // One loop should be necessary here - for (auto& vp_pair : mSavedVisualParamMap) + for (param_map_t::value_type& vp_pair : mSavedVisualParamMap) { S32 id = vp_pair.first; LLVisualParam *param = getVisualParam(id); @@ -562,7 +562,7 @@ void LLWearable::saveValues() { //update saved settings so wearable is no longer dirty mSavedVisualParamMap.clear(); - for (auto& vp_pair : mVisualParamIndexMap) + for (const visual_param_index_map_t::value_type& vp_pair : mVisualParamIndexMap) { S32 id = vp_pair.first; LLVisualParam *wearable_param = vp_pair.second; @@ -680,7 +680,7 @@ LLVisualParam* LLWearable::getVisualParam(S32 index) const void LLWearable::getVisualParams(visual_param_vec_t &list) { // add all visual params to the passed-in vector - for(auto& vp_pair : mVisualParamIndexMap) + for(visual_param_index_map_t::value_type& vp_pair : mVisualParamIndexMap) { list.push_back(vp_pair.second); } @@ -688,7 +688,7 @@ void LLWearable::getVisualParams(visual_param_vec_t &list) void LLWearable::animateParams(F32 delta) { - for(auto& vp_pair : mVisualParamIndexMap) + for(visual_param_index_map_t::value_type& vp_pair : mVisualParamIndexMap) { LLVisualParam *param = (LLVisualParam*)vp_pair.second; param->animate(delta); |