浏览代码

Merge pull request #4167 from assimp/kimkulling-fix_uninitialized_attribs_issue-4158

Update anim.h
Kim Kulling 3 年之前
父节点
当前提交
d4755648b4
共有 2 个文件被更改,包括 11 次插入0 次删除
  1. 3 0
      include/assimp/anim.h
  2. 8 0
      include/assimp/mesh.h

+ 3 - 0
include/assimp/anim.h

@@ -98,6 +98,7 @@ struct aiVectorKey {
     bool operator<(const aiVectorKey &rhs) const {
         return mTime < rhs.mTime;
     }
+    
     bool operator>(const aiVectorKey &rhs) const {
         return mTime > rhs.mTime;
     }
@@ -131,6 +132,7 @@ struct aiQuatKey {
     bool operator==(const aiQuatKey &rhs) const {
         return rhs.mValue == this->mValue;
     }
+    
     bool operator!=(const aiQuatKey &rhs) const {
         return rhs.mValue != this->mValue;
     }
@@ -139,6 +141,7 @@ struct aiQuatKey {
     bool operator<(const aiQuatKey &rhs) const {
         return mTime < rhs.mTime;
     }
+    
     bool operator>(const aiQuatKey &rhs) const {
         return mTime > rhs.mTime;
     }

+ 8 - 0
include/assimp/mesh.h

@@ -300,6 +300,10 @@ struct aiBone {
     aiBone() AI_NO_EXCEPT
             : mName(),
               mNumWeights(0),
+#ifndef ASSIMP_BUILD_NO_ARMATUREPOPULATE_PROCESS
+              mArmature(nullptr),
+              mNode(nullptr),
+#endif
               mWeights(nullptr),
               mOffsetMatrix() {
         // empty
@@ -309,6 +313,10 @@ struct aiBone {
     aiBone(const aiBone &other) :
             mName(other.mName),
             mNumWeights(other.mNumWeights),
+#ifndef ASSIMP_BUILD_NO_ARMATUREPOPULATE_PROCESS
+              mArmature(nullptr),
+              mNode(nullptr),
+#endif
             mWeights(nullptr),
             mOffsetMatrix(other.mOffsetMatrix) {
         if (other.mWeights && other.mNumWeights) {