From d0f115ae093e8268da2a3245d6cb2f3bcc544f1c Mon Sep 17 00:00:00 2001 From: Fawrsk Date: Thu, 5 Jan 2023 07:42:27 -0400 Subject: SL-18893 Cleanup for loops in llcharacter to use C++11 range based for loops (#42) --- indra/llcharacter/llpose.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/llcharacter/llpose.cpp') diff --git a/indra/llcharacter/llpose.cpp b/indra/llcharacter/llpose.cpp index fc95fafd61..a7156a250b 100644 --- a/indra/llcharacter/llpose.cpp +++ b/indra/llcharacter/llpose.cpp @@ -148,11 +148,9 @@ LLJointState* LLPose::findJointState(const std::string &name) void LLPose::setWeight(F32 weight) { joint_map_iterator iter; - for(iter = mJointMap.begin(); - iter != mJointMap.end(); - ++iter) + for (joint_map_value_type joint_pair : mJointMap) { - iter->second->setWeight(weight); + joint_pair.second->setWeight(weight); } mWeight = weight; } -- cgit v1.2.3 From 7419037ef6e8a5497283278baa8582b264d3aefa Mon Sep 17 00:00:00 2001 From: Fawrsk Date: Tue, 10 Jan 2023 05:43:27 -0400 Subject: SL-18893 Fixes for pull requests #38, #41, and #42 (#46) Eliminate unnecessary copies, and remove uses of auto --- indra/llcharacter/llpose.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcharacter/llpose.cpp') diff --git a/indra/llcharacter/llpose.cpp b/indra/llcharacter/llpose.cpp index a7156a250b..6f41a0e747 100644 --- a/indra/llcharacter/llpose.cpp +++ b/indra/llcharacter/llpose.cpp @@ -148,7 +148,7 @@ LLJointState* LLPose::findJointState(const std::string &name) void LLPose::setWeight(F32 weight) { joint_map_iterator iter; - for (joint_map_value_type joint_pair : mJointMap) + for (joint_map_value_type& joint_pair : mJointMap) { joint_pair.second->setWeight(weight); } -- cgit v1.2.3