From 43a1134397d7f6033709c2588c435db89d9ef755 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 6 Aug 2025 12:30:04 +0100 Subject: [PATCH] Performance tweak. --- pcbnew/router/pns_diff_pair.cpp | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/pcbnew/router/pns_diff_pair.cpp b/pcbnew/router/pns_diff_pair.cpp index ab61442e47..e400a57840 100644 --- a/pcbnew/router/pns_diff_pair.cpp +++ b/pcbnew/router/pns_diff_pair.cpp @@ -215,7 +215,6 @@ bool DIFF_PAIR::BuildInitial( const DP_GATEWAY& aEntry, const DP_GATEWAY &aTarge int mask = aEntry.AllowedAngles() | DIRECTION_45::ANG_STRAIGHT | DIRECTION_45::ANG_OBTUSE; - SHAPE_LINE_CHAIN sum_n, sum_p; m_p = p; m_n = n; @@ -224,22 +223,19 @@ bool DIFF_PAIR::BuildInitial( const DP_GATEWAY& aEntry, const DP_GATEWAY &aTarge if( !aEntry.Entry().CheckConnectionAngle( *this, mask ) ) return false; - sum_p = aEntry.Entry().CP(); - sum_n = aEntry.Entry().CN(); - sum_p.Append( p ); - sum_n.Append( n ); + m_p = aEntry.Entry().CP(); + m_n = aEntry.Entry().CN(); + m_p.Append( p ); + m_n.Append( n ); } else { - sum_p = p; - sum_n = n; + m_p = p; + m_n = n; } mask = aTarget.AllowedAngles() | DIRECTION_45::ANG_STRAIGHT | DIRECTION_45::ANG_OBTUSE; - m_p = sum_p; - m_n = sum_n; - if( aTarget.HasEntryLines() ) { DP_GATEWAY t( aTarget ); @@ -248,13 +244,10 @@ bool DIFF_PAIR::BuildInitial( const DP_GATEWAY& aEntry, const DP_GATEWAY &aTarge if( !CheckConnectionAngle( t.Entry(), mask ) ) return false; - sum_p.Append( t.Entry().CP() ); - sum_n.Append( t.Entry().CN() ); + m_p.Append( t.Entry().CP() ); + m_n.Append( t.Entry().CN() ); } - m_p = sum_p; - m_n = sum_n; - if( !checkGap( p, n, m_gapConstraint ) ) return false;