Fix compiler warnings: var declarations hides other var.

This commit is contained in:
kkulling
2019-03-13 16:58:18 +01:00
parent 0dc2e9197a
commit 650fadebe9
6 changed files with 75 additions and 71 deletions

View File

@@ -577,15 +577,16 @@ void ValidateDSProcess::SearchForInvalidTextures(const aiMaterial* pMaterial,
int iNumIndices = 0;
int iIndex = -1;
for (unsigned int i = 0; i < pMaterial->mNumProperties;++i)
{
aiMaterialProperty* prop = pMaterial->mProperties[i];
if (!::strcmp(prop->mKey.data,"$tex.file") && prop->mSemantic == type) {
for (unsigned int i = 0; i < pMaterial->mNumProperties;++i) {
aiMaterialProperty* prop = pMaterial->mProperties[ i ];
ai_assert(nullptr != prop);
if ( !::strcmp(prop->mKey.data,"$tex.file") && prop->mSemantic == static_cast<unsigned int>(type)) {
iIndex = std::max(iIndex, (int) prop->mIndex);
++iNumIndices;
if (aiPTI_String != prop->mType)
ReportError("Material property %s is expected to be a string",prop->mKey.data);
if (aiPTI_String != prop->mType) {
ReportError("Material property %s is expected to be a string", prop->mKey.data);
}
}
}
if (iIndex +1 != iNumIndices) {