else
{
++m_before;
- for ( brush_vector_t::const_iterator i = out.begin(); i != out.end(); ++i )
- {
+ for ( Brush *b : out ) {
++m_after;
- ( *i )->removeEmptyFaces();
- if ( !( *i )->empty() ) {
+ b->removeEmptyFaces();
+ if ( !b->empty() ) {
NodeSmartReference node( ( new BrushNode() )->node() );
- Node_getBrush( node )->copy( *( *i ) );
- delete ( *i );
+ Node_getBrush( node )->copy( *b );
Node_getTraversable( path.parent() )->insert( node );
}
- else{
- delete ( *i );
- }
+ delete b;
}
Path_deleteTop( path );
+ if( Node_getTraversable( path.parent() )->empty() ){
+ m_eraseParent = true;
+ }
}
}
}