Browse Source

Addressed warnings generated on MSVC across x86 and x64.

Jared Mulconry 8 years ago
parent
commit
059a32654e

+ 1 - 1
code/MMDImporter.cpp

@@ -118,7 +118,7 @@ void MMDImporter::InternReadFile(const std::string &file, aiScene *pScene,
 
   // Get the file-size and validate it, throwing an exception when fails
   fileStream.seekg(0, fileStream.end);
-  size_t fileSize = fileStream.tellg();
+  size_t fileSize = static_cast<size_t>(fileStream.tellg());
   fileStream.seekg(0, fileStream.beg);
 
   if (fileSize < sizeof(pmx::PmxModel)) {

+ 1 - 1
code/glTF2Exporter.cpp

@@ -741,7 +741,7 @@ void glTF2Exporter::MergeMeshes()
     for (unsigned int n = 0; n < mAsset->nodes.Size(); ++n) {
         Ref<Node> node = mAsset->nodes.Get(n);
 
-        unsigned int nMeshes = node->meshes.size();
+        unsigned int nMeshes = static_cast<unsigned int>(node->meshes.size());
 
         //skip if it's 1 or less meshes per node
         if (nMeshes > 1) {

+ 5 - 0
samples/SimpleOpenGL/CMakeLists.txt

@@ -16,6 +16,11 @@ IF ( NOT GLUT_FOUND )
   ENDIF ( MSVC )
 ENDIF ( NOT GLUT_FOUND )
 
+if ( MSVC )
+  ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS )
+  ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS )
+endif ( MSVC )
+
 INCLUDE_DIRECTORIES(
   ${Assimp_SOURCE_DIR}/include
   ${Assimp_SOURCE_DIR}/code

+ 5 - 0
samples/SimpleTexturedOpenGL/CMakeLists.txt

@@ -11,6 +11,11 @@ IF ( NOT GLUT_FOUND )
   ENDIF ( MSVC )
 ENDIF ( NOT GLUT_FOUND )
 
+if ( MSVC )
+  ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS )
+  ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS )
+endif ( MSVC )
+
 INCLUDE_DIRECTORIES(
   ${Assimp_SOURCE_DIR}/include
   ${Assimp_SOURCE_DIR}/code

+ 0 - 1
tools/assimp_view/stdafx.h

@@ -23,7 +23,6 @@
 #define _WIN32_IE 0x0600    // Ändern Sie dies in den geeigneten Wert für andere Versionen von IE.
 #endif
 
-#define WIN32_LEAN_AND_MEAN     // Selten verwendete Teile der Windows-Header nicht einbinden.
 // Windows-Headerdateien:
 #include <windows.h>