Use unique_ptr for aaiFaces instead of explicit delete[]
parent
795c0abcc8
commit
03397d42e2
|
@ -231,7 +231,7 @@ void SMDImporter::CreateOutputMeshes() {
|
|||
pScene->mMeshes = new aiMesh*[pScene->mNumMeshes];
|
||||
|
||||
typedef std::vector<unsigned int> FaceList;
|
||||
FaceList* aaiFaces = new FaceList[pScene->mNumMeshes];
|
||||
std::unique_ptr<FaceList[]> aaiFaces(new FaceList[pScene->mNumMeshes]);
|
||||
|
||||
// approximate the space that will be required
|
||||
unsigned int iNum = (unsigned int)asTriangles.size() / pScene->mNumMeshes;
|
||||
|
@ -392,7 +392,6 @@ void SMDImporter::CreateOutputMeshes() {
|
|||
}
|
||||
delete[] aaiBones;
|
||||
}
|
||||
delete[] aaiFaces;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue