Performance optimization.

This commit is contained in:
Jeff Young 2023-05-08 11:46:04 +01:00
parent 5b3798a370
commit 2dcbc10a09
1 changed files with 4 additions and 0 deletions

View File

@ -215,6 +215,10 @@ struct NODE::DEFAULT_OBSTACLE_VISITOR : public OBSTACLE_VISITOR
if( !aCandidate->OfKind( m_ctx->options.m_kindMask ) )
return true;
// Collisions with self aren't a thing; don't spend time on them.
if( m_item == aCandidate )
return true;
if( visit( aCandidate ) )
return true;