Cleaning up code in preparation for merge
This commit is contained in:
parent
70b545895b
commit
f7ea4ddb72
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue