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/llanimationstates.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'indra/llcharacter/llanimationstates.cpp') diff --git a/indra/llcharacter/llanimationstates.cpp b/indra/llcharacter/llanimationstates.cpp index c16cae1bbc..c8709dda19 100644 --- a/indra/llcharacter/llanimationstates.cpp +++ b/indra/llcharacter/llanimationstates.cpp @@ -379,12 +379,11 @@ LLUUID LLAnimationLibrary::stringToAnimState( const std::string& name, BOOL allo if (true_name) { - for (anim_map_t::iterator iter = mAnimMap.begin(); - iter != mAnimMap.end(); iter++) + for (anim_map_t::value_type anim_pair : mAnimMap) { - if (iter->second == true_name) + if (anim_pair.second == true_name) { - id = iter->first; + id = anim_pair.first; break; } } -- 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/llanimationstates.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcharacter/llanimationstates.cpp') diff --git a/indra/llcharacter/llanimationstates.cpp b/indra/llcharacter/llanimationstates.cpp index c8709dda19..2e78e30405 100644 --- a/indra/llcharacter/llanimationstates.cpp +++ b/indra/llcharacter/llanimationstates.cpp @@ -379,7 +379,7 @@ LLUUID LLAnimationLibrary::stringToAnimState( const std::string& name, BOOL allo if (true_name) { - for (anim_map_t::value_type anim_pair : mAnimMap) + for (anim_map_t::value_type& anim_pair : mAnimMap) { if (anim_pair.second == true_name) { -- cgit v1.2.3