Fixed bug (missing #ifdef/#endif)

This commit is contained in:
Cirilo Bernardo 2016-01-07 15:55:24 +11:00
parent 7dd4bd9f09
commit 0bb4beb5d7
2 changed files with 8 additions and 1 deletions

View File

@ -4,7 +4,7 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/v2 ${CMAKE_CURRENT_SOURCE_DIR}/v2
) )
add_definitions( -DDEBUG_VRML1=3 -DDEBUG_VRML2=3 ) add_definitions( -DDEBUG_VRML1=2 -DDEBUG_VRML2=2 )
add_library( s3d_plugin_vrml MODULE add_library( s3d_plugin_vrml MODULE
vrml.cpp vrml.cpp

View File

@ -84,7 +84,9 @@ typedef std::pair< std::string, WRL1NODES > NODEITEM;
typedef std::map< std::string, WRL1NODES > NODEMAP; typedef std::map< std::string, WRL1NODES > NODEMAP;
static NODEMAP nodenames; static NODEMAP nodenames;
#if defined( DEBUG_VRML1 ) && ( DEBUG_VRML1 > 2 )
std::string WRL1NODE::tabs = ""; std::string WRL1NODE::tabs = "";
#endif
WRL1NODE::WRL1NODE( NAMEREGISTER* aDictionary ) WRL1NODE::WRL1NODE( NAMEREGISTER* aDictionary )
{ {
@ -356,6 +358,11 @@ WRL1STATUS* WRL1NODE::GetCurrentSettings( void )
WRL1NODES WRL1NODE::getNodeTypeID( const std::string aNodeName ) WRL1NODES WRL1NODE::getNodeTypeID( const std::string aNodeName )
{ {
// 'Group' is a special case; it has been deprecated
// but otherwise is similar enough to Separator.
if( !aNodeName.compare( "Group" ) )
return WRL1_SEPARATOR;
NODEMAP::iterator it = nodenames.find( aNodeName ); NODEMAP::iterator it = nodenames.find( aNodeName );
if( nodenames.end() != it ) if( nodenames.end() != it )