change std::array<int, x > to std::array<unsigned int, x> to fix compiler warnings.

pull/2552/head
kimkulling 2019-07-19 13:03:08 +02:00
parent 68520bff0c
commit e84f961f78
1 changed files with 5 additions and 5 deletions

View File

@ -276,7 +276,7 @@ TEST_F(utglTF2ImportExport, importglTF2PrimitiveModeLineLoop) {
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_09.gltf", aiProcess_ValidateDataStructure);
EXPECT_NE(nullptr, scene);
EXPECT_EQ(scene->mMeshes[0]->mNumVertices, 4u);
std::array<int, 5> l1 = {{ 0, 3u, 2u, 1u, 0u }};
std::array<unsigned int, 5> l1 = {{ 0, 3u, 2u, 1u, 0u }};
EXPECT_EQ(scene->mMeshes[0]->mFaces[0].mNumIndices, 2u);
for (unsigned int i = 0; i < scene->mMeshes[0]->mNumFaces; ++i)
{
@ -291,7 +291,7 @@ TEST_F(utglTF2ImportExport, importglTF2PrimitiveModeLineStrip) {
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/glTF2/glTF-Asset-Generator/Mesh_PrimitiveMode/Mesh_PrimitiveMode_10.gltf", aiProcess_ValidateDataStructure);
EXPECT_NE(nullptr, scene);
EXPECT_EQ(scene->mMeshes[0]->mNumVertices, 4u);
std::array<int, 5> l1 = {{ 0u, 3u, 2u, 1u, 0u }};
std::array<unsigned int, 5> l1 = {{ 0u, 3u, 2u, 1u, 0u }};
EXPECT_EQ(scene->mMeshes[0]->mFaces[0].mNumIndices, 2u);
for (unsigned int i = 0; i < scene->mMeshes[0]->mNumFaces; ++i) {
EXPECT_EQ(scene->mMeshes[0]->mFaces[i].mIndices[0], l1[i]);
@ -306,13 +306,13 @@ TEST_F(utglTF2ImportExport, importglTF2PrimitiveModeTrianglesStrip) {
EXPECT_NE(nullptr, scene);
EXPECT_EQ(scene->mMeshes[0]->mNumFaces, 2u);
EXPECT_EQ(scene->mMeshes[0]->mNumVertices, 4u);
std::array<int, 3> f1 = {{ 0u, 3u, 1u }};
std::array<unsigned int, 3> f1 = {{ 0u, 3u, 1u }};
EXPECT_EQ(scene->mMeshes[0]->mFaces[0].mNumIndices, 3u);
for (size_t i = 0; i < 3; ++i) {
EXPECT_EQ(scene->mMeshes[0]->mFaces[0].mIndices[i], f1[i]);
}
std::array<int, 3> f2 = {{ 1u, 3u, 2u }};
std::array<unsigned int, 3> f2 = {{ 1u, 3u, 2u }};
EXPECT_EQ(scene->mMeshes[0]->mFaces[1].mNumIndices, 3u);
for (size_t i = 0; i < 3; ++i) {
EXPECT_EQ(scene->mMeshes[0]->mFaces[1].mIndices[i], f2[i]);
@ -326,7 +326,7 @@ TEST_F(utglTF2ImportExport, importglTF2PrimitiveModeTrianglesFan) {
EXPECT_NE(nullptr, scene);
EXPECT_EQ(scene->mMeshes[0]->mNumVertices, 4u);
EXPECT_EQ(scene->mMeshes[0]->mNumFaces, 2u);
std::array<int, 3> f1 = {{ 0u, 3u, 2u }};
std::array<unsigned int, 3> f1 = {{ 0u, 3u, 2u }};
EXPECT_EQ(scene->mMeshes[0]->mFaces[0].mNumIndices, 3);
for (size_t i = 0; i < 3; ++i) {
EXPECT_EQ(scene->mMeshes[0]->mFaces[0].mIndices[i], f1[i]);