Browse Source

Fixed: Initialize members in 3DS loader

Richard 10 years ago
parent
commit
d899f4db57
2 changed files with 12 additions and 3 deletions
  1. 4 3
      code/3DSHelper.h
  2. 8 0
      code/3DSLoader.cpp

+ 4 - 3
code/3DSHelper.h

@@ -332,6 +332,7 @@ struct Texture
         , mScaleV   (1.0f)
         , mScaleV   (1.0f)
         , mRotation (0.0f)
         , mRotation (0.0f)
         , mMapMode  (aiTextureMapMode_Wrap)
         , mMapMode  (aiTextureMapMode_Wrap)
+        , bPrivate()
         , iUVSrc    (0)
         , iUVSrc    (0)
     {
     {
         mTextureBlend = get_qnan();
         mTextureBlend = get_qnan();
@@ -484,11 +485,11 @@ struct aiFloatKey
 struct Node
 struct Node
 {
 {
     Node()
     Node()
-
-        :   mHierarchyPos       (0)
+        : mParent()
+        , mInstanceNumber()
+        ,   mHierarchyPos       (0)
         ,   mHierarchyIndex     (0)
         ,   mHierarchyIndex     (0)
         ,   mInstanceCount      (1)
         ,   mInstanceCount      (1)
-
     {
     {
         static int iCnt = 0;
         static int iCnt = 0;
 
 

+ 8 - 0
code/3DSLoader.cpp

@@ -103,6 +103,14 @@ static const aiImporterDesc desc = {
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Constructor to be privately used by Importer
 // Constructor to be privately used by Importer
 Discreet3DSImporter::Discreet3DSImporter()
 Discreet3DSImporter::Discreet3DSImporter()
+    : stream(),
+    mLastNodeIndex(),
+    mCurrentNode(),
+    mRootNode(),
+    mScene(),
+    mMasterScale(),
+    bHasBG(),
+    bIsPrj()
 {}
 {}
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------