diff options
author | Fawrsk <fawrsk@gmail.com> | 2023-01-10 05:43:27 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-10 11:43:27 +0200 |
commit | 7419037ef6e8a5497283278baa8582b264d3aefa (patch) | |
tree | d4486cea253918ce1ff533148a4b7f8d9ddc2688 /indra/llappearance/lldriverparam.cpp | |
parent | 9c250f1a9ee2e49505a35513cb88de54e2694e6c (diff) |
SL-18893 Fixes for pull requests #38, #41, and #42 (#46)
Eliminate unnecessary copies, and remove uses of auto
Diffstat (limited to 'indra/llappearance/lldriverparam.cpp')
-rw-r--r-- | indra/llappearance/lldriverparam.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
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) { |