fix warnings

This commit is contained in:
kkulling
2020-03-11 09:43:55 +01:00
parent 02e5698a38
commit f8757322be
12 changed files with 331 additions and 344 deletions
+8 -6
View File
@@ -49,7 +49,9 @@ using namespace Assimp;
class TestProgressHandler : public ProgressHandler {
public:
TestProgressHandler() : ProgressHandler() {
TestProgressHandler() :
ProgressHandler(),
mPercentage (0.f) {
// empty
}
@@ -60,6 +62,7 @@ public:
bool Update(float percentage = -1.f) override {
return true;
}
float mPercentage;
};
class ExporterTest : public ::testing::Test {
@@ -77,12 +80,11 @@ TEST_F(ExporterTest, ExporterIdTest) {
Exporter exporter;
size_t exportFormatCount = exporter.GetExportFormatCount();
EXPECT_NE(0u, exportFormatCount) << "No registered exporters";
typedef std::map<std::string, const aiExportFormatDesc*> ExportIdMap;
typedef std::map<std::string, const aiExportFormatDesc *> ExportIdMap;
ExportIdMap exporterMap;
for (size_t i = 0; i < exportFormatCount; ++i)
{
for (size_t i = 0; i < exportFormatCount; ++i) {
// Check that the exporter description exists and makes sense
const aiExportFormatDesc* desc = exporter.GetExportFormatDescription(i);
const aiExportFormatDesc *desc = exporter.GetExportFormatDescription(i);
ASSERT_NE(nullptr, desc) << "Missing aiExportFormatDesc at index " << i;
EXPECT_NE(nullptr, desc->id) << "Null exporter ID at index " << i;
EXPECT_STRNE("", desc->id) << "Empty exporter ID at index " << i;
@@ -97,6 +99,6 @@ TEST_F(ExporterTest, ExporterIdTest) {
EXPECT_TRUE(result.second) << "Duplicate exported id: '" << key << "' " << desc->description << " *." << desc->fileExtension << " at index " << i;
}
const aiExportFormatDesc* desc = exporter.GetExportFormatDescription(exportFormatCount);
const aiExportFormatDesc *desc = exporter.GetExportFormatDescription(exportFormatCount);
EXPECT_EQ(nullptr, desc) << "More exporters than claimed";
}