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/lllocaltextureobject.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/llappearance/lllocaltextureobject.cpp') diff --git a/indra/llappearance/lllocaltextureobject.cpp b/indra/llappearance/lllocaltextureobject.cpp index 3f564ec3de..b66b51f4e4 100644 --- a/indra/llappearance/lllocaltextureobject.cpp +++ b/indra/llappearance/lllocaltextureobject.cpp @@ -95,9 +95,8 @@ LLTexLayer* LLLocalTextureObject::getTexLayer(U32 index) const LLTexLayer* LLLocalTextureObject::getTexLayer(const std::string &name) { - for( tex_layer_vec_t::iterator iter = mTexLayers.begin(); iter != mTexLayers.end(); iter++) + for(auto layer : mTexLayers) { - LLTexLayer *layer = *iter; if (layer->getName().compare(name) == 0) { return layer; -- 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/lllocaltextureobject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llappearance/lllocaltextureobject.cpp') 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) { -- cgit v1.2.3