From 0e54b87b1e6993f469a9fe1a9a4e477c37973a79 Mon Sep 17 00:00:00 2001 From: Andy Maloney Date: Wed, 12 Jun 2013 08:59:47 -0400 Subject: [PATCH] Prefer init list and add missing initializations --- include/assimp/material.h | 10 +++++++--- include/assimp/mesh.h | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/include/assimp/material.h b/include/assimp/material.h index 0634ec7c7..25cb3d6e0 100644 --- a/include/assimp/material.h +++ b/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() { diff --git a/include/assimp/mesh.h b/include/assimp/mesh.h index 757299d72..449451632 100644 --- a/include/assimp/mesh.h +++ b/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++){