From 74a9280c698b4f88a46549923a2d717b82dd7ee2 Mon Sep 17 00:00:00 2001 From: Fawrsk <45524015+Fawrsk@users.noreply.github.com> Date: Tue, 3 Jan 2023 17:08:15 -0400 Subject: SL-18893 Clean up for loops in llappearance to use C++11 range based for loops (#38) --- indra/llappearance/llavatarappearance.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'indra/llappearance/llavatarappearance.h') diff --git a/indra/llappearance/llavatarappearance.h b/indra/llappearance/llavatarappearance.h index b1c70f9064..cb1cbc11a6 100644 --- a/indra/llappearance/llavatarappearance.h +++ b/indra/llappearance/llavatarappearance.h @@ -387,10 +387,9 @@ protected: LLAvatarMeshInfo() : mLOD(0), mMinPixelArea(.1f) {} ~LLAvatarMeshInfo() { - morph_info_list_t::iterator iter; - for (iter = mPolyMorphTargetInfoList.begin(); iter != mPolyMorphTargetInfoList.end(); iter++) + for (auto& pair : mPolyMorphTargetInfoList) { - delete iter->first; + delete pair.first; } mPolyMorphTargetInfoList.clear(); } -- 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/llappearance/llavatarappearance.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llappearance/llavatarappearance.h') 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; } -- cgit v1.2.3