summaryrefslogtreecommitdiff
path: root/indra/llappearance/llpolymesh.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2023-05-19 10:43:14 -0400
committerNat Goodspeed <nat@lindenlab.com>2023-05-19 10:43:14 -0400
commit7efe727f266af2119d4cd6e33fdd6c26636c1a24 (patch)
tree62cce6d78c94b58205ce43bebd693303488ddace /indra/llappearance/llpolymesh.cpp
parentffca94c0b89d9734fa16fde7751bd0e5785e5ea2 (diff)
parent5a70639b7992842a9f74ec81b11bac56608b8f2e (diff)
DRTVWR-558: Merge branch 'main' of secondlife/viewer into actions
Diffstat (limited to 'indra/llappearance/llpolymesh.cpp')
-rw-r--r--indra/llappearance/llpolymesh.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/indra/llappearance/llpolymesh.cpp b/indra/llappearance/llpolymesh.cpp
index 0a7a8d27bb..dab14851c8 100644
--- a/indra/llappearance/llpolymesh.cpp
+++ b/indra/llappearance/llpolymesh.cpp
@@ -612,14 +612,16 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
// we reached the end of the morphs
break;
}
- LLPolyMorphData* morph_data = new LLPolyMorphData(std::string(morphName));
+ std::string morph_name(morphName);
+ LLPolyMorphData* morph_data = new LLPolyMorphData(morph_name);
BOOL result = morph_data->loadBinary(fp, this);
if (!result)
{
- delete morph_data;
- continue;
+ LL_WARNS() << "Failure loading " << morph_name << " from " << fileName << LL_ENDL;
+ delete morph_data;
+ continue;
}
mMorphData.insert(morph_data);
@@ -888,11 +890,10 @@ void LLPolyMesh::dumpDiagInfo()
LL_INFOS() << "-----------------------------------------------------" << LL_ENDL;
// print each loaded mesh, and it's memory usage
- for(LLPolyMeshSharedDataTable::iterator iter = sGlobalSharedMeshList.begin();
- iter != sGlobalSharedMeshList.end(); ++iter)
+ for(const LLPolyMeshSharedDataTable::value_type& mesh_pair : sGlobalSharedMeshList)
{
- const std::string& mesh_name = iter->first;
- LLPolyMeshSharedData* mesh = iter->second;
+ const std::string& mesh_name = mesh_pair.first;
+ LLPolyMeshSharedData* mesh = mesh_pair.second;
S32 num_verts = mesh->mNumVertices;
S32 num_faces = mesh->mNumFaces;
@@ -995,14 +996,12 @@ LLPolyMorphData* LLPolyMesh::getMorphData(const std::string& morph_name)
{
if (!mSharedData)
return NULL;
- for (LLPolyMeshSharedData::morphdata_list_t::iterator iter = mSharedData->mMorphData.begin();
- iter != mSharedData->mMorphData.end(); ++iter)
+ for (LLPolyMorphData* morph_data : mSharedData->mMorphData)
{
- LLPolyMorphData *morph_data = *iter;
- if (morph_data->getName() == morph_name)
- {
- return morph_data;
- }
+ if (morph_data->getName() == morph_name)
+ {
+ return morph_data;
+ }
}
return NULL;
}