AMFImporter: fix some review findings.
parent
f2817587ab
commit
a80d7346d8
|
@ -188,7 +188,7 @@ void AMFImporter::XML_CheckNode_MustHaveChildren()
|
||||||
|
|
||||||
void AMFImporter::XML_CheckNode_SkipUnsupported(const std::string& pParentNodeName)
|
void AMFImporter::XML_CheckNode_SkipUnsupported(const std::string& pParentNodeName)
|
||||||
{
|
{
|
||||||
const size_t Uns_Skip_Len = 3;
|
static const size_t Uns_Skip_Len = 3;
|
||||||
const char* Uns_Skip[Uns_Skip_Len] = { "composite", "edge", "normal" };
|
const char* Uns_Skip[Uns_Skip_Len] = { "composite", "edge", "normal" };
|
||||||
|
|
||||||
static bool skipped_before[Uns_Skip_Len] = { false, false, false };
|
static bool skipped_before[Uns_Skip_Len] = { false, false, false };
|
||||||
|
@ -435,7 +435,7 @@ std::unique_ptr<IOStream> file(pIOHandler->Open(pFile, "rb"));
|
||||||
void AMFImporter::ParseNode_Root()
|
void AMFImporter::ParseNode_Root()
|
||||||
{
|
{
|
||||||
std::string unit, version;
|
std::string unit, version;
|
||||||
CAMFImporter_NodeElement* ne;
|
CAMFImporter_NodeElement *ne( nullptr );
|
||||||
|
|
||||||
// Read attributes for node <amf>.
|
// Read attributes for node <amf>.
|
||||||
MACRO_ATTRREAD_LOOPBEG;
|
MACRO_ATTRREAD_LOOPBEG;
|
||||||
|
@ -482,7 +482,7 @@ CAMFImporter_NodeElement* ne;
|
||||||
void AMFImporter::ParseNode_Constellation()
|
void AMFImporter::ParseNode_Constellation()
|
||||||
{
|
{
|
||||||
std::string id;
|
std::string id;
|
||||||
CAMFImporter_NodeElement* ne;
|
CAMFImporter_NodeElement* ne( nullptr );
|
||||||
|
|
||||||
// Read attributes for node <constellation>.
|
// Read attributes for node <constellation>.
|
||||||
MACRO_ATTRREAD_LOOPBEG;
|
MACRO_ATTRREAD_LOOPBEG;
|
||||||
|
@ -523,7 +523,7 @@ CAMFImporter_NodeElement* ne;
|
||||||
void AMFImporter::ParseNode_Instance()
|
void AMFImporter::ParseNode_Instance()
|
||||||
{
|
{
|
||||||
std::string objectid;
|
std::string objectid;
|
||||||
CAMFImporter_NodeElement* ne;
|
CAMFImporter_NodeElement* ne( nullptr );
|
||||||
|
|
||||||
// Read attributes for node <constellation>.
|
// Read attributes for node <constellation>.
|
||||||
MACRO_ATTRREAD_LOOPBEG;
|
MACRO_ATTRREAD_LOOPBEG;
|
||||||
|
@ -578,7 +578,7 @@ CAMFImporter_NodeElement* ne;
|
||||||
void AMFImporter::ParseNode_Object()
|
void AMFImporter::ParseNode_Object()
|
||||||
{
|
{
|
||||||
std::string id;
|
std::string id;
|
||||||
CAMFImporter_NodeElement* ne;
|
CAMFImporter_NodeElement* ne( nullptr );
|
||||||
|
|
||||||
// Read attributes for node <object>.
|
// Read attributes for node <object>.
|
||||||
MACRO_ATTRREAD_LOOPBEG;
|
MACRO_ATTRREAD_LOOPBEG;
|
||||||
|
@ -643,7 +643,7 @@ CAMFImporter_NodeElement* ne;
|
||||||
void AMFImporter::ParseNode_Metadata()
|
void AMFImporter::ParseNode_Metadata()
|
||||||
{
|
{
|
||||||
std::string type, value;
|
std::string type, value;
|
||||||
CAMFImporter_NodeElement* ne;
|
CAMFImporter_NodeElement* ne( nullptr );
|
||||||
|
|
||||||
// read attribute
|
// read attribute
|
||||||
MACRO_ATTRREAD_LOOPBEG;
|
MACRO_ATTRREAD_LOOPBEG;
|
||||||
|
@ -667,7 +667,9 @@ bool AMFImporter::CanRead(const std::string& pFile, IOSystem* pIOHandler, bool p
|
||||||
{
|
{
|
||||||
const std::string extension = GetExtension(pFile);
|
const std::string extension = GetExtension(pFile);
|
||||||
|
|
||||||
if(extension == "amf") return true;
|
if ( extension == "amf" ) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(!extension.length() || pCheckSig)
|
if(!extension.length() || pCheckSig)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue