diff options
author | Fawrsk <45524015+Fawrsk@users.noreply.github.com> | 2023-01-03 17:08:15 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-03 23:08:15 +0200 |
commit | 74a9280c698b4f88a46549923a2d717b82dd7ee2 (patch) | |
tree | 029f57168a5f69cb7eb60b21faddecdeadec0f26 /indra/llappearance/llavatarappearancedefines.cpp | |
parent | 43496fe04e7dadae230da5b633a389ba0b7c0b0b (diff) |
SL-18893 Clean up for loops in llappearance to use C++11 range based for loops (#38)
Diffstat (limited to 'indra/llappearance/llavatarappearancedefines.cpp')
-rw-r--r-- | indra/llappearance/llavatarappearancedefines.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/indra/llappearance/llavatarappearancedefines.cpp b/indra/llappearance/llavatarappearancedefines.cpp index 2bcfd06c40..5ab3f92b31 100644 --- a/indra/llappearance/llavatarappearancedefines.cpp +++ b/indra/llappearance/llavatarappearancedefines.cpp @@ -183,18 +183,15 @@ LLAvatarAppearanceDictionary::~LLAvatarAppearanceDictionary() // map it to the baked texture. void LLAvatarAppearanceDictionary::createAssociations() { - for (BakedTextures::const_iterator iter = mBakedTextures.begin(); iter != mBakedTextures.end(); iter++) + for (const auto& baked_pair : mBakedTextures) { - const EBakedTextureIndex baked_index = (iter->first); - const BakedEntry *dict = (iter->second); + const EBakedTextureIndex baked_index = baked_pair.first; + const BakedEntry *dict = baked_pair.second; // For each texture that this baked texture index affects, associate those textures // with this baked texture index. - for (texture_vec_t::const_iterator local_texture_iter = dict->mLocalTextures.begin(); - local_texture_iter != dict->mLocalTextures.end(); - local_texture_iter++) + for (const auto local_texture_index : dict->mLocalTextures) { - const ETextureIndex local_texture_index = (ETextureIndex) *local_texture_iter; mTextures[local_texture_index]->mIsUsedByBakedTexture = true; mTextures[local_texture_index]->mBakedTextureIndex = baked_index; } |