Browse Source

Prefer init list and add missing initializations

Andy Maloney 12 years ago
parent
commit
0e54b87b1e
2 changed files with 8 additions and 3 deletions
  1. 7 3
      include/assimp/material.h
  2. 1 0
      include/assimp/mesh.h

+ 7 - 3
include/assimp/material.h

@@ -631,9 +631,13 @@ struct aiMaterialProperty
 
 #ifdef __cplusplus
 
-	aiMaterialProperty()	{
-		mData = NULL;
-		mIndex = mSemantic = 0;
+	aiMaterialProperty()
+		: mSemantic( 0 )
+		, mIndex( 0 )
+		, mDataLength( 0 )
+		, mType( aiPTI_Float )
+		, mData( NULL )
+	{
 	}
 
 	~aiMaterialProperty()	{

+ 1 - 0
include/assimp/mesh.h

@@ -382,6 +382,7 @@ struct aiAnimMesh
 		, mNormals()
 		, mTangents()
 		, mBitangents()
+		, mNumVertices( 0 )
 	{
 		// fixme consider moving this to the ctor initializer list as well
 		for( unsigned int a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; a++){