Cleaning up code in preparation for merge

This commit is contained in:
Cirilo Bernardo 2015-12-31 10:31:35 +11:00
parent 70b545895b
commit f7ea4ddb72
2 changed files with 24 additions and 7 deletions

View File

@ -117,7 +117,7 @@ bool WRL2BASE::Read( WRLPROC& proc )
WRL2NODE* node = NULL;
while( ReadNode( proc, this, &node ) );
while( ReadNode( proc, this, &node ) && !proc.eof() );
if( proc.eof() )
return true;
@ -287,8 +287,11 @@ bool WRL2BASE::ReadNode( WRLPROC& proc, WRL2NODE* aParent, WRL2NODE** aNode )
if( !proc.ReadName( glob ) )
{
#ifdef DEBUG
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << proc.GetError() << "\n";
if( !proc.eof() )
{
std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
std::cerr << proc.GetError() << "\n";
}
#endif
return false;

View File

@ -184,16 +184,30 @@ SCENEGRAPH* Load( char const* aFileName )
return NULL;
if( proc.GetVRMLType() == VRML_V1 )
std::cout << "XXX: Processing VRML 1.0 file\n";
{
#ifdef DEBUG
std::cout << " * [INFO] Processing VRML 1.0 file\n";
#endif
}
else
{
std::cout << "XXX: Processing VRML 2.0 file\n";
#ifdef DEBUG
std::cout << " * [INFO] Processing VRML 2.0 file\n";
#endif
WRL2BASE* bp = new WRL2BASE;
if( !bp->Read( proc ) )
std::cout << "XXX: load failed\n";
{
#ifdef DEBUG
std::cout << " * [INFO] load failed\n";
#endif
}
else
std::cout << "XXX: load completed\n";
{
#ifdef DEBUG
std::cout << " * [INFO] load completed\n";
#endif
}
delete bp;
}