From d16b8953b58f27958641b69009d3a62264d98638 Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Sat, 19 Nov 2016 03:24:55 +1100 Subject: [PATCH] Fixed build warnings on MSVC14 x64 in the Collada exporter. --- code/ColladaExporter.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/code/ColladaExporter.cpp b/code/ColladaExporter.cpp index fdb31903f..72ca6aee3 100644 --- a/code/ColladaExporter.cpp +++ b/code/ColladaExporter.cpp @@ -524,7 +524,7 @@ void ColladaExporter::ReadMaterialSurface( Surface& poSurface, const aiMaterial* } else { if( pKey ) - poSurface.exist = pSrcMat->Get( pKey, pType, pIndex, poSurface.color) == aiReturn_SUCCESS; + poSurface.exist = pSrcMat->Get( pKey, static_cast(pType), static_cast(pIndex), poSurface.color) == aiReturn_SUCCESS; } } @@ -827,7 +827,7 @@ void ColladaExporter::WriteGeometry( size_t pIndex) // texture coords for( size_t a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a) { - if( mesh->HasTextureCoords( a) ) + if( mesh->HasTextureCoords(static_cast(a)) ) { WriteFloatArray( idstr + "-tex" + to_string(a), mesh->mNumUVComponents[a] == 3 ? FloatType_TexCoord3 : FloatType_TexCoord2, (ai_real*) mesh->mTextureCoords[a], mesh->mNumVertices); @@ -837,7 +837,7 @@ void ColladaExporter::WriteGeometry( size_t pIndex) // vertex colors for( size_t a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a) { - if( mesh->HasVertexColors( a) ) + if( mesh->HasVertexColors(static_cast(a)) ) WriteFloatArray( idstr + "-color" + to_string(a), FloatType_Color, (ai_real*) mesh->mColors[a], mesh->mNumVertices); } @@ -849,12 +849,12 @@ void ColladaExporter::WriteGeometry( size_t pIndex) mOutput << startstr << "" << endstr; for( size_t a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a ) { - if( mesh->HasTextureCoords( a) ) + if( mesh->HasTextureCoords(static_cast(a)) ) mOutput << startstr << "" << endstr; } for( size_t a = 0; a < AI_MAX_NUMBER_OF_COLOR_SETS; ++a ) { - if( mesh->HasVertexColors( a) ) + if( mesh->HasVertexColors(static_cast(a) ) ) mOutput << startstr << "" << endstr; } @@ -899,7 +899,7 @@ void ColladaExporter::WriteGeometry( size_t pIndex) mOutput << startstr << "" << endstr; for( size_t a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a ) { - if( mesh->HasTextureCoords( a) ) + if( mesh->HasTextureCoords(static_cast(a) ) ) mOutput << startstr << "" << endstr; } @@ -1129,7 +1129,7 @@ void ColladaExporter::WriteNode( const aiScene* pScene, aiNode* pNode) PushTag(); for( size_t a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a ) { - if( mesh->HasTextureCoords( a) ) + if( mesh->HasTextureCoords( static_cast(a) ) ) // semantic as in // input_semantic as in // input_set as in