Update XFileParser.cpp

Fix compiler warnings.
pull/1990/head
Kim Kulling 2018-06-16 10:32:43 +02:00 committed by GitHub
parent 3e45acbf4e
commit d416fe874e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -472,7 +472,7 @@ void XFileParser::ParseDataObjectMesh( Mesh* pMesh)
Face& face = pMesh->mPosFaces[a]; Face& face = pMesh->mPosFaces[a];
for (unsigned int b = 0; b < numIndices; ++b) { for (unsigned int b = 0; b < numIndices; ++b) {
const int idx( ReadInt() ); const int idx( ReadInt() );
if ( idx <= numVertices ) { if ( static_cast<unsigned int>( idx ) <= numVertices ) {
face.mIndices.push_back( idx ); face.mIndices.push_back( idx );
} }
} }
@ -1309,7 +1309,7 @@ unsigned int XFileParser::ReadInt()
--mBinaryNumCount; --mBinaryNumCount;
const size_t len( mEnd - mP ); const size_t len( mEnd - mP );
if ( mEnd - mP >= 4) { if ( len >= 4) {
return ReadBinDWord(); return ReadBinDWord();
} else { } else {
mP = mEnd; mP = mEnd;