more fixes for coverity-findings.
parent
4c6db68d34
commit
859153e3e6
|
@ -96,13 +96,16 @@ ColladaLoader::ColladaLoader()
|
|||
, mAnims()
|
||||
, noSkeletonMesh( false )
|
||||
, ignoreUpDirection(false)
|
||||
, mNodeNameCounter( 0 )
|
||||
{}
|
||||
, useColladaName( false )
|
||||
, mNodeNameCounter( 0 ) {
|
||||
// empty
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Destructor, private as well
|
||||
ColladaLoader::~ColladaLoader()
|
||||
{}
|
||||
ColladaLoader::~ColladaLoader() {
|
||||
// empty
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Returns whether the class can handle the format of the given file.
|
||||
|
|
|
@ -56,6 +56,9 @@ public:
|
|||
const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/PLY/cube.ply", aiProcess_ValidateDataStructure);
|
||||
EXPECT_EQ( 1u, scene->mNumMeshes );
|
||||
EXPECT_NE( nullptr, scene->mMeshes[0] );
|
||||
if (nullptr == scene->mMeshes[0]) {
|
||||
return false;
|
||||
}
|
||||
EXPECT_EQ( 8u, scene->mMeshes[0]->mNumVertices );
|
||||
EXPECT_EQ( 6u, scene->mMeshes[0]->mNumFaces );
|
||||
|
||||
|
|
|
@ -356,11 +356,12 @@ std::vector<char> ReadFile(const char* name) {
|
|||
}
|
||||
|
||||
::fseek(p, 0, SEEK_END);
|
||||
const auto size = ::ftell(p);
|
||||
const size_t size = ::ftell(p);
|
||||
::fseek(p, 0, SEEK_SET);
|
||||
|
||||
ret.resize(size);
|
||||
::fread(&ret[0], 1, size, p);
|
||||
const size_t readSize = ::fread(&ret[0], 1, size, p);
|
||||
EXPECT_EQ(readSize, size);
|
||||
::fclose(p);
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Reference in New Issue