Refactor: Prefer value initialization over std::fill

pull/596/head
Richard 2015-07-01 19:03:09 -06:00
parent c69e047dfc
commit 9f0c12c1c6
1 changed files with 4 additions and 5 deletions

View File

@ -47,7 +47,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/scene.h> #include <assimp/scene.h>
#include <assimp/ai_assert.h> #include <assimp/ai_assert.h>
#include <algorithm>
#include <vector> #include <vector>
static const aiImporterDesc desc = { static const aiImporterDesc desc = {
@ -194,9 +193,9 @@ OpenGEXImporter::VertexContainer::VertexContainer()
: m_numVerts( 0 ) : m_numVerts( 0 )
, m_vertices(NULL) , m_vertices(NULL)
, m_numNormals( 0 ) , m_numNormals( 0 )
, m_normals(NULL) { , m_normals(NULL)
std::fill(&m_numUVComps[0], &m_numUVComps[AI_MAX_NUMBER_OF_TEXTURECOORDS], 0U); , m_numUVComps()
std::fill(&m_textureCoords[0], &m_textureCoords[AI_MAX_NUMBER_OF_TEXTURECOORDS], static_cast<aiVector3D *>(NULL)); , m_textureCoords() {
} }
//------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------
@ -228,13 +227,13 @@ OpenGEXImporter::OpenGEXImporter()
, m_meshCache() , m_meshCache()
, m_mesh2refMap() , m_mesh2refMap()
, m_ctx( NULL ) , m_ctx( NULL )
, m_metrics()
, m_currentNode( NULL ) , m_currentNode( NULL )
, m_currentMesh( NULL ) , m_currentMesh( NULL )
, m_currentMaterial( NULL ) , m_currentMaterial( NULL )
, m_tokenType( Grammar::NoneType ) , m_tokenType( Grammar::NoneType )
, m_nodeStack() , m_nodeStack()
, m_unresolvedRefStack() { , m_unresolvedRefStack() {
std::fill(&m_metrics[0], &m_metrics[MetricInfo::Max], MetricInfo());
} }
//------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------