浏览代码

size_t is not the same as unsigned int on some systems

contriteobserver 4 年之前
父节点
当前提交
69fc809307
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      code/AssetLib/Collada/ColladaLoader.cpp

+ 1 - 1
code/AssetLib/Collada/ColladaLoader.cpp

@@ -559,7 +559,7 @@ void ColladaLoader::BuildMeshesForNode(const ColladaParser &pParser, const Colla
                 // assign the material index
                 std::map<std::string, size_t>::const_iterator matIt = mMaterialIndexByName.find(submesh.mMaterial);
                 if (matIt != mMaterialIndexByName.end()) {
-                    dstMesh->mMaterialIndex = matIt->second;
+                    dstMesh->mMaterialIndex = static_cast<unsigned int>(matIt->second);
                 } else {
                     dstMesh->mMaterialIndex = matIdx;
                 }