add and use Entity::getClassName(), Entity::hasKeyValue()

do not return default value from getKeyValue()
This commit is contained in:
Garux
2021-05-16 10:13:42 +03:00
parent ed04f90497
commit da98f5f9d9
18 changed files with 73 additions and 78 deletions

View File

@@ -159,7 +159,7 @@ public:
}
void popElement( const char* name ){
ASSERT_MESSAGE( string_equal( name, "entity" ), PARSE_ERROR );
NodeSmartReference entity( m_entityTable.createEntity( GlobalEntityClassManager().findOrInsert( Node_getEntity( node() )->getKeyValue( "classname" ), node_is_group( node() ) ) ) );
NodeSmartReference entity( m_entityTable.createEntity( GlobalEntityClassManager().findOrInsert( Node_getEntity( node() )->getClassName(), node_is_group( node() ) ) ) );
{
EntityCopyingVisitor visitor( *Node_getEntity( entity ) );