Browse Source

Fix warning about possibly uninitialized variable

It might be better to move FindEmptyUVChannel call earlier
Turo Lamminen 10 years ago
parent
commit
84a9514d4b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      code/ComputeUVMappingProcess.cpp

+ 1 - 1
code/ComputeUVMappingProcess.cpp

@@ -454,7 +454,7 @@ void ComputeUVMappingProcess::Execute( aiScene* pScene)
 						for (unsigned int m = 0; m < pScene->mNumMeshes;++m)
 						for (unsigned int m = 0; m < pScene->mNumMeshes;++m)
 						{
 						{
 							aiMesh* mesh = pScene->mMeshes[m];
 							aiMesh* mesh = pScene->mMeshes[m];
-							unsigned int outIdx;
+							unsigned int outIdx = 0;
 							if ( mesh->mMaterialIndex != i || ( outIdx = FindEmptyUVChannel(mesh) ) == UINT_MAX ||
 							if ( mesh->mMaterialIndex != i || ( outIdx = FindEmptyUVChannel(mesh) ) == UINT_MAX ||
 								!mesh->mNumVertices)
 								!mesh->mNumVertices)
 							{
 							{