Browse Source

Update XFileParser.cpp

Fix compiler warnings.
Kim Kulling 7 years ago
parent
commit
d416fe874e
1 changed files with 2 additions and 2 deletions
  1. 2 2
      code/XFileParser.cpp

+ 2 - 2
code/XFileParser.cpp

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