Fix warning: comparison between unsigned and signed.

pull/3346/head
Kim Kulling 2020-07-24 10:57:24 +02:00
parent 59e15b7fd1
commit 6886ea6c65
1 changed files with 4 additions and 6 deletions

View File

@ -548,11 +548,9 @@ TEST_F(utglTF2ImportExport, indexOutOfRange) {
// The contents of an asset should not lead to an assert. // The contents of an asset should not lead to an assert.
Assimp::Importer importer; Assimp::Importer importer;
struct LogObserver : Assimp::LogStream struct LogObserver : Assimp::LogStream {
{
bool m_observedWarning = false; bool m_observedWarning = false;
void write(const char *message) override void write(const char *message) override {
{
m_observedWarning = m_observedWarning || std::strstr(message, "faces were dropped"); m_observedWarning = m_observedWarning || std::strstr(message, "faces were dropped");
} }
}; };
@ -562,8 +560,8 @@ TEST_F(utglTF2ImportExport, indexOutOfRange) {
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/glTF2/IndexOutOfRange/IndexOutOfRange.gltf", aiProcess_ValidateDataStructure); const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/glTF2/IndexOutOfRange/IndexOutOfRange.gltf", aiProcess_ValidateDataStructure);
ASSERT_NE(scene, nullptr); ASSERT_NE(scene, nullptr);
ASSERT_NE(scene->mRootNode, nullptr); ASSERT_NE(scene->mRootNode, nullptr);
ASSERT_EQ(scene->mNumMeshes, 1); ASSERT_EQ(scene->mNumMeshes, 1u);
EXPECT_EQ(scene->mMeshes[0]->mNumFaces, 11); EXPECT_EQ(scene->mMeshes[0]->mNumFaces, 11u);
DefaultLogger::get()->detachStream(&logObserver); DefaultLogger::get()->detachStream(&logObserver);
EXPECT_TRUE(logObserver.m_observedWarning); EXPECT_TRUE(logObserver.m_observedWarning);
} }