From 0bb4beb5d7560d58c62536aef42febdf99659c61 Mon Sep 17 00:00:00 2001 From: Cirilo Bernardo Date: Thu, 7 Jan 2016 15:55:24 +1100 Subject: [PATCH] Fixed bug (missing #ifdef/#endif) --- plugins/3d/vrml/CMakeLists.txt | 2 +- plugins/3d/vrml/v1/vrml1_node.cpp | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/3d/vrml/CMakeLists.txt b/plugins/3d/vrml/CMakeLists.txt index a833d64160..fbea834ff2 100644 --- a/plugins/3d/vrml/CMakeLists.txt +++ b/plugins/3d/vrml/CMakeLists.txt @@ -4,7 +4,7 @@ include_directories( ${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 vrml.cpp diff --git a/plugins/3d/vrml/v1/vrml1_node.cpp b/plugins/3d/vrml/v1/vrml1_node.cpp index 74d506815b..9e7f7b23e8 100644 --- a/plugins/3d/vrml/v1/vrml1_node.cpp +++ b/plugins/3d/vrml/v1/vrml1_node.cpp @@ -84,7 +84,9 @@ typedef std::pair< std::string, WRL1NODES > NODEITEM; typedef std::map< std::string, WRL1NODES > NODEMAP; static NODEMAP nodenames; +#if defined( DEBUG_VRML1 ) && ( DEBUG_VRML1 > 2 ) std::string WRL1NODE::tabs = ""; +#endif WRL1NODE::WRL1NODE( NAMEREGISTER* aDictionary ) { @@ -356,6 +358,11 @@ WRL1STATUS* WRL1NODE::GetCurrentSettings( void ) 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 ); if( nodenames.end() != it )