浏览代码

Removed signed int vs unsigned int comparison in for loops

Sebastian Matusik 7 年之前
父节点
当前提交
992194b1b9
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      code/glTF2Importer.cpp

+ 2 - 2
code/glTF2Importer.cpp

@@ -462,7 +462,7 @@ void glTF2Importer::ImportMeshes(glTF2::Asset& r)
                     if (target.position.size() > 0) {
                         aiVector3D *positionDiff = nullptr;
                         target.position[0]->ExtractData(positionDiff);
-                        for(int vertexId = 0; vertexId < aim->mNumVertices; vertexId++) {
+                        for(unsigned int vertexId = 0; vertexId < aim->mNumVertices; vertexId++) {
                             aiAnimMesh.mVertices[vertexId] += positionDiff[vertexId];
                         }
                         delete [] positionDiff;
@@ -470,7 +470,7 @@ void glTF2Importer::ImportMeshes(glTF2::Asset& r)
                     if (target.normal.size() > 0) {
                         aiVector3D *normalDiff = nullptr;
                         target.normal[0]->ExtractData(normalDiff);
-                        for(int vertexId = 0; vertexId < aim->mNumVertices; vertexId++) {
+                        for(unsigned int vertexId = 0; vertexId < aim->mNumVertices; vertexId++) {
                             aiAnimMesh.mNormals[vertexId] += normalDiff[vertexId];
                         }
                         delete [] normalDiff;