summaryrefslogtreecommitdiff
path: root/indra/llappearance/llpolymesh.cpp
diff options
context:
space:
mode:
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;
}