fix warnings detected in vs2017.

pull/3012/head
kimkulling 2020-03-19 12:58:41 +01:00
parent 68f7f545a9
commit 4d917c97bd
3 changed files with 19 additions and 19 deletions

View File

@ -828,11 +828,11 @@ void glTF2Exporter::ExportMeshes()
for (unsigned int vt = 0; vt < pAnimMesh->mNumVertices; ++vt) { for (unsigned int vt = 0; vt < pAnimMesh->mNumVertices; ++vt) {
pPositionDiff[vt] = pAnimMesh->mVertices[vt] - aim->mVertices[vt]; pPositionDiff[vt] = pAnimMesh->mVertices[vt] - aim->mVertices[vt];
} }
Ref<Accessor> v = ExportData(*mAsset, meshId, b, Ref<Accessor> vec = ExportData(*mAsset, meshId, b,
pAnimMesh->mNumVertices, pPositionDiff, pAnimMesh->mNumVertices, pPositionDiff,
AttribType::VEC3, AttribType::VEC3, ComponentType_FLOAT); AttribType::VEC3, AttribType::VEC3, ComponentType_FLOAT);
if (v) { if (vec) {
p.targets[am].position.push_back(v); p.targets[am].position.push_back(vec);
} }
delete[] pPositionDiff; delete[] pPositionDiff;
} }
@ -843,11 +843,11 @@ void glTF2Exporter::ExportMeshes()
for (unsigned int vt = 0; vt < pAnimMesh->mNumVertices; ++vt) { for (unsigned int vt = 0; vt < pAnimMesh->mNumVertices; ++vt) {
pNormalDiff[vt] = pAnimMesh->mNormals[vt] - aim->mNormals[vt]; pNormalDiff[vt] = pAnimMesh->mNormals[vt] - aim->mNormals[vt];
} }
Ref<Accessor> v = ExportData(*mAsset, meshId, b, Ref<Accessor> vec = ExportData(*mAsset, meshId, b,
pAnimMesh->mNumVertices, pNormalDiff, pAnimMesh->mNumVertices, pNormalDiff,
AttribType::VEC3, AttribType::VEC3, ComponentType_FLOAT); AttribType::VEC3, AttribType::VEC3, ComponentType_FLOAT);
if (v) { if (vec) {
p.targets[am].normal.push_back(v); p.targets[am].normal.push_back(vec);
} }
delete[] pNormalDiff; delete[] pNormalDiff;
} }

View File

@ -158,10 +158,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif #endif
#ifdef _MSC_VER #ifdef _MSC_VER
# pragma warning(disable : 4521 4512 4714 4127 4351 4510 ) # pragma warning(disable : 4521 4512 4714 4127 4351 4510 )
# ifdef ASSIMP_BUILD_DLL_EXPORT # ifdef ASSIMP_BUILD_DLL_EXPORT
# pragma warning (disable : 4251) # pragma warning (disable : 4251)
# endif # endif
/* Force the compiler to inline a function, if possible /* Force the compiler to inline a function, if possible
*/ */
# define AI_FORCE_INLINE __forceinline # define AI_FORCE_INLINE __forceinline

View File

@ -44,18 +44,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#pragma once #pragma once
#ifndef AI_TYPES_H_INC #ifndef AI_TYPES_H_INC
# define AI_TYPES_H_INC #define AI_TYPES_H_INC
# ifdef __GNUC__ #ifdef __GNUC__
# pragma GCC system_header # pragma GCC system_header
# endif #endif
// Some runtime headers // Some runtime headers
# include <limits.h> #include <limits.h>
# include <stddef.h> #include <stddef.h>
# include <stdint.h> #include <stdint.h>
# include <string.h> #include <string.h>
# include <sys/types.h> #include <sys/types.h>
// Our compile configuration // Our compile configuration
# include <assimp/defs.h> # include <assimp/defs.h>