From b2672c082d652b8af19b886c9419a01b6af0fc22 Mon Sep 17 00:00:00 2001 From: Steve M Date: Thu, 12 Jan 2023 12:01:22 -0800 Subject: [PATCH 1/2] Change mMethod type to enum aiMorphingMethod Address sanitizer warning --- include/assimp/mesh.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/assimp/mesh.h b/include/assimp/mesh.h index 49d43f9f9..363627464 100644 --- a/include/assimp/mesh.h +++ b/include/assimp/mesh.h @@ -566,6 +566,9 @@ struct aiAnimMesh { /** @brief Enumerates the methods of mesh morphing supported by Assimp. */ enum aiMorphingMethod { + /** Morphing method to be determined */ + aiMorphingMethod_UNKNOWN = 0x0, + /** Interpolation between morph targets */ aiMorphingMethod_VERTEX_BLEND = 0x1, @@ -747,7 +750,7 @@ struct aiMesh { * Method of morphing when anim-meshes are specified. * @see aiMorphingMethod to learn more about the provided morphing targets. */ - unsigned int mMethod; + enum aiMorphingMethod mMethod; /** * The bounding box. @@ -778,7 +781,7 @@ struct aiMesh { mMaterialIndex(0), mNumAnimMeshes(0), mAnimMeshes(nullptr), - mMethod(0), + mMethod(aiMorphingMethod_UNKNOWN), mAABB(), mTextureCoordsNames(nullptr) { for (unsigned int a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a) { @@ -1002,7 +1005,7 @@ struct aiSkeletonBone { #endif // __cplusplus }; /** - * @brief + * @brief */ struct aiSkeleton { /** From 2d37f49f51e022d3862f9e3e55d9353fa229a80e Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sun, 15 Jan 2023 19:12:24 +0100 Subject: [PATCH 2/2] Remove deprecated comment - closes https://github.com/assimp/assimp/issues/4869 --- code/AssetLib/FBX/FBXTokenizer.h | 1 - 1 file changed, 1 deletion(-) diff --git a/code/AssetLib/FBX/FBXTokenizer.h b/code/AssetLib/FBX/FBXTokenizer.h index 5ed48e61d..79f71229b 100644 --- a/code/AssetLib/FBX/FBXTokenizer.h +++ b/code/AssetLib/FBX/FBXTokenizer.h @@ -154,7 +154,6 @@ private: const unsigned int column; }; -// XXX should use C++11's unique_ptr - but assimp's need to keep working with 03 typedef const Token* TokenPtr; typedef std::vector< TokenPtr > TokenList;