Fix coverity findings.

This commit is contained in:
Kim Kulling
2016-11-22 10:22:15 +01:00
parent 566aa1ae00
commit c5e3058ab3
6 changed files with 75 additions and 50 deletions

View File

@@ -56,7 +56,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <sstream>
#include <cctype>
using namespace Assimp;
// ------------------------------------------------------------------------------------------------
@@ -461,29 +460,32 @@ void BaseImporter::TextFileToBuffer(IOStream* stream,
}
// ------------------------------------------------------------------------------------------------
namespace Assimp
{
namespace Assimp {
// Represents an import request
struct LoadRequest
{
struct LoadRequest {
LoadRequest(const std::string& _file, unsigned int _flags,const BatchLoader::PropertyMap* _map, unsigned int _id)
: file(_file), flags(_flags), refCnt(1),scene(NULL), loaded(false), id(_id)
{
if (_map)
: file(_file)
, flags(_flags)
, refCnt(1)
, scene(NULL)
, loaded(false)
, id(_id) {
if ( _map ) {
map = *_map;
}
}
const std::string file;
unsigned int flags;
unsigned int refCnt;
aiScene* scene;
bool loaded;
BatchLoader::PropertyMap map;
unsigned int id;
bool operator== (const std::string& f) const {
bool operator== ( const std::string& f ) const {
return file == f;
}
const std::string file;
unsigned int flags;
unsigned int refCnt;
aiScene *scene;
bool loaded;
BatchLoader::PropertyMap map;
unsigned int id;
};
}