fix compiler warnings in tools and test-
This commit is contained in:
@@ -49,7 +49,9 @@ using namespace Assimp;
|
||||
|
||||
class TestProgressHandler : public ProgressHandler {
|
||||
public:
|
||||
TestProgressHandler() : ProgressHandler() {
|
||||
TestProgressHandler() :
|
||||
ProgressHandler(),
|
||||
mPercentage(0.f) {
|
||||
// empty
|
||||
}
|
||||
|
||||
@@ -58,8 +60,10 @@ public:
|
||||
}
|
||||
|
||||
bool Update(float percentage = -1.f) override {
|
||||
mPercentage = percentage;
|
||||
return true;
|
||||
}
|
||||
float mPercentage;
|
||||
};
|
||||
|
||||
class ExporterTest : public ::testing::Test {
|
||||
@@ -77,12 +81,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 +100,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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user