fix precision issue within memory copy

pull/949/head
Chris Russ 2016-07-18 08:23:46 +10:00
parent 6128987210
commit 4f7b624fe8
3 changed files with 5 additions and 5 deletions

View File

@ -321,7 +321,7 @@ aiReturn Exporter :: Export( const aiScene* pScene, const char* pFormatId, const
// Always create a full copy of the scene. We might optimize this one day,
// but for now it is the most pragmatic way.
aiScene* scenecopy_tmp;
aiScene* scenecopy_tmp = NULL;
SceneCombiner::CopyScene(&scenecopy_tmp,pScene);
std::unique_ptr<aiScene> scenecopy(scenecopy_tmp);

View File

@ -942,7 +942,7 @@ void SceneCombiner::MergeMaterials(aiMaterial** dest,
// ------------------------------------------------------------------------------------------------
template <typename Type>
inline void CopyPtrArray (Type**& dest, const Type* const * src, unsigned int num)
inline void CopyPtrArray (Type**& dest, const Type* const * src, ai_uint num)
{
if (!num)
{
@ -950,14 +950,14 @@ inline void CopyPtrArray (Type**& dest, const Type* const * src, unsigned int nu
return;
}
dest = new Type*[num];
for (unsigned int i = 0; i < num;++i) {
for (ai_uint i = 0; i < num;++i) {
SceneCombiner::Copy(&dest[i],src[i]);
}
}
// ------------------------------------------------------------------------------------------------
template <typename Type>
inline void GetArrayCopy (Type*& dest, unsigned int num )
inline void GetArrayCopy (Type*& dest, ai_uint num )
{
if (!dest)return;
Type* old = dest;

View File

@ -111,7 +111,7 @@ struct aiNode
/** The number of meshes of this node. */
unsigned int mNumMeshes;
/** The meshes of this node. Each entry is an index into the
/** The meshes of this node. Each entry is an index into the
* mesh list of the #aiScene.
*/
unsigned int* mMeshes;