فهرست منبع

fix warnings detected in vs2017.

kimkulling 5 سال پیش
والد
کامیت
4d917c97bd
3فایلهای تغییر یافته به همراه19 افزوده شده و 19 حذف شده
  1. 6 6
      code/glTF2/glTF2Exporter.cpp
  2. 4 4
      include/assimp/defs.h
  3. 9 9
      include/assimp/types.h

+ 6 - 6
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<Accessor> v = ExportData(*mAsset, meshId, b,
+                    Ref<Accessor> 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<Accessor> v = ExportData(*mAsset, meshId, b,
+                    Ref<Accessor> 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;
                 }

+ 4 - 4
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

+ 9 - 9
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 <limits.h>
-#    include <stddef.h>
-#    include <stdint.h>
-#    include <string.h>
-#    include <sys/types.h>
+#include <limits.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <string.h>
+#include <sys/types.h>
 
 // Our compile configuration
 #    include <assimp/defs.h>