瀏覽代碼

Bugfix : Replaced some new[]s with std::vectors ( merged from GitHub, thanks to Riku Palomäki ).

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1214 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
kimmi 13 年之前
父節點
當前提交
79f255bc40
共有 1 個文件被更改,包括 1 次插入4 次删除
  1. 1 4
      code/ASELoader.cpp

+ 1 - 4
code/ASELoader.cpp

@@ -1152,7 +1152,7 @@ void ASEImporter::ConvertMeshes(ASE::Mesh& mesh, std::vector<aiMesh*>& avOutMesh
 
 
 		// copy vertex bones
 		// copy vertex bones
 		if (!mesh.mBones.empty() && !mesh.mBoneVertices.empty())	{
 		if (!mesh.mBones.empty() && !mesh.mBoneVertices.empty())	{
-			std::vector<aiVertexWeight>* avBonesOut = new std::vector<aiVertexWeight>[mesh.mBones.size()];
+			std::vector<std::vector<aiVertexWeight> > avBonesOut( mesh.mBones.size() );
 
 
 			// find all vertex weights for this bone
 			// find all vertex weights for this bone
 			unsigned int quak = 0;
 			unsigned int quak = 0;
@@ -1188,9 +1188,6 @@ void ASEImporter::ConvertMeshes(ASE::Mesh& mesh, std::vector<aiMesh*>& avOutMesh
 					++pcBone;
 					++pcBone;
 				}
 				}
 			}
 			}
-
-			// delete allocated storage
-			delete[] avBonesOut;
 		}
 		}
 	}
 	}
 }
 }