From 4d917c97bd6992b9c9b4fe15fd71e1cbe2e5edc0 Mon Sep 17 00:00:00 2001 From: kimkulling Date: Thu, 19 Mar 2020 12:58:41 +0100 Subject: [PATCH] fix warnings detected in vs2017. --- code/glTF2/glTF2Exporter.cpp | 12 ++++++------ include/assimp/defs.h | 8 ++++---- include/assimp/types.h | 18 +++++++++--------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/code/glTF2/glTF2Exporter.cpp b/code/glTF2/glTF2Exporter.cpp index 76e2814d4..d101cd77a 100644 --- a/code/glTF2/glTF2Exporter.cpp +++ b/code/glTF2/glTF2Exporter.cpp @@ -828,11 +828,11 @@ void glTF2Exporter::ExportMeshes() for (unsigned int vt = 0; vt < pAnimMesh->mNumVertices; ++vt) { pPositionDiff[vt] = pAnimMesh->mVertices[vt] - aim->mVertices[vt]; } - Ref v = ExportData(*mAsset, meshId, b, + Ref vec = ExportData(*mAsset, meshId, b, pAnimMesh->mNumVertices, pPositionDiff, AttribType::VEC3, AttribType::VEC3, ComponentType_FLOAT); - if (v) { - p.targets[am].position.push_back(v); + if (vec) { + p.targets[am].position.push_back(vec); } delete[] pPositionDiff; } @@ -843,11 +843,11 @@ void glTF2Exporter::ExportMeshes() for (unsigned int vt = 0; vt < pAnimMesh->mNumVertices; ++vt) { pNormalDiff[vt] = pAnimMesh->mNormals[vt] - aim->mNormals[vt]; } - Ref v = ExportData(*mAsset, meshId, b, + Ref vec = ExportData(*mAsset, meshId, b, pAnimMesh->mNumVertices, pNormalDiff, AttribType::VEC3, AttribType::VEC3, ComponentType_FLOAT); - if (v) { - p.targets[am].normal.push_back(v); + if (vec) { + p.targets[am].normal.push_back(vec); } delete[] pNormalDiff; } diff --git a/include/assimp/defs.h b/include/assimp/defs.h index f7e32972b..92ba558f3 100644 --- a/include/assimp/defs.h +++ b/include/assimp/defs.h @@ -158,10 +158,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #endif #ifdef _MSC_VER -# pragma warning(disable : 4521 4512 4714 4127 4351 4510 ) -# ifdef ASSIMP_BUILD_DLL_EXPORT -# pragma warning (disable : 4251) -# endif +# pragma warning(disable : 4521 4512 4714 4127 4351 4510 ) +# ifdef ASSIMP_BUILD_DLL_EXPORT +# pragma warning (disable : 4251) +# endif /* Force the compiler to inline a function, if possible */ # define AI_FORCE_INLINE __forceinline diff --git a/include/assimp/types.h b/include/assimp/types.h index f43520fe3..98bdacdad 100644 --- a/include/assimp/types.h +++ b/include/assimp/types.h @@ -44,18 +44,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #pragma once #ifndef AI_TYPES_H_INC -# define AI_TYPES_H_INC +#define AI_TYPES_H_INC -# ifdef __GNUC__ -# pragma GCC system_header -# endif +#ifdef __GNUC__ +# pragma GCC system_header +#endif // Some runtime headers -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include // Our compile configuration # include