Code formatting.
This commit is contained in:
parent
2a4f8db792
commit
f752f7875e
|
@ -40,7 +40,7 @@
|
|||
using boost::optional;
|
||||
|
||||
PNS_DIFF_PAIR_PLACER::PNS_DIFF_PAIR_PLACER( PNS_ROUTER* aRouter ) :
|
||||
PNS_PLACEMENT_ALGO ( aRouter )
|
||||
PNS_PLACEMENT_ALGO( aRouter )
|
||||
{
|
||||
m_state = RT_START;
|
||||
m_chainedPlacement = false;
|
||||
|
@ -121,6 +121,7 @@ bool PNS_DIFF_PAIR_PLACER::rhMarkObstacles( const VECTOR2I& aP )
|
|||
bool collN = static_cast<bool>( m_currentNode->CheckColliding( &m_currentTrace.NLine() ) );
|
||||
|
||||
m_fitOk = !( collP || collN ) ;
|
||||
|
||||
return m_fitOk;
|
||||
}
|
||||
|
||||
|
@ -304,9 +305,9 @@ bool PNS_DIFF_PAIR_PLACER::route( const VECTOR2I& aP )
|
|||
case RM_MarkObstacles:
|
||||
return rhMarkObstacles( aP );
|
||||
case RM_Walkaround:
|
||||
return rhWalkOnly ( aP );
|
||||
return rhWalkOnly( aP );
|
||||
case RM_Shove:
|
||||
return rhShoveOnly ( aP );
|
||||
return rhShoveOnly( aP );
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -319,7 +320,7 @@ bool PNS_DIFF_PAIR_PLACER::rhShoveOnly( const VECTOR2I& aP )
|
|||
{
|
||||
m_currentNode = m_shove->CurrentNode();
|
||||
|
||||
bool ok = routeHead ( aP );
|
||||
bool ok = routeHead( aP );
|
||||
|
||||
m_fitOk = false;
|
||||
|
||||
|
@ -529,7 +530,7 @@ bool PNS_DIFF_PAIR_PLACER::findDpPrimitivePair( const VECTOR2I& aP, PNS_ITEM* aI
|
|||
double bestDist = std::numeric_limits<double>::max();
|
||||
bool found = false;
|
||||
|
||||
BOOST_FOREACH(PNS_ITEM* item, items )
|
||||
BOOST_FOREACH( PNS_ITEM* item, items )
|
||||
{
|
||||
if( item->Kind() == aItem->Kind() )
|
||||
{
|
||||
|
@ -748,8 +749,8 @@ bool PNS_DIFF_PAIR_PLACER::FixRoute( const VECTOR2I& aP, PNS_ITEM* aEndItem )
|
|||
|
||||
if( !m_snapOnTarget && !m_currentTrace.EndsWithVias() )
|
||||
{
|
||||
SHAPE_LINE_CHAIN newP ( m_currentTrace.CP() );
|
||||
SHAPE_LINE_CHAIN newN ( m_currentTrace.CN() );
|
||||
SHAPE_LINE_CHAIN newP( m_currentTrace.CP() );
|
||||
SHAPE_LINE_CHAIN newN( m_currentTrace.CN() );
|
||||
|
||||
if( newP.SegmentCount() > 1 && newN.SegmentCount() > 1 )
|
||||
{
|
||||
|
@ -765,8 +766,11 @@ bool PNS_DIFF_PAIR_PLACER::FixRoute( const VECTOR2I& aP, PNS_ITEM* aEndItem )
|
|||
m_lastNode->Add( m_currentTrace.PLine().Via().Clone() );
|
||||
m_lastNode->Add( m_currentTrace.NLine().Via().Clone() );
|
||||
m_chainedPlacement = false;
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
m_chainedPlacement = !m_snapOnTarget;
|
||||
}
|
||||
|
||||
PNS_LINE lineP( m_currentTrace.PLine() );
|
||||
PNS_LINE lineN( m_currentTrace.NLine() );
|
||||
|
|
|
@ -626,12 +626,12 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::pushVia( PNS_VIA* aVia, const VECTOR2I& aForc
|
|||
}
|
||||
}
|
||||
|
||||
m_draggedViaHeadSet.Add ( pushedVia );
|
||||
m_draggedViaHeadSet.Add( pushedVia );
|
||||
|
||||
if ( aDryRun )
|
||||
if( aDryRun )
|
||||
return SH_OK;
|
||||
|
||||
replaceItems ( aVia, pushedVia );
|
||||
replaceItems( aVia, pushedVia );
|
||||
|
||||
#ifdef DEBUG
|
||||
m_logger.Log( aVia, 0, "obstacle-via" );
|
||||
|
@ -649,7 +649,7 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::pushVia( PNS_VIA* aVia, const VECTOR2I& aForc
|
|||
{
|
||||
lp.second.Mark( MK_HEAD );
|
||||
|
||||
if ( m_multiLineMode )
|
||||
if( m_multiLineMode )
|
||||
return SH_INCOMPLETE;
|
||||
|
||||
m_newHead = lp.second;
|
||||
|
@ -1146,7 +1146,7 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::ShoveMultiLines( const PNS_ITEMSET& aHeadSet
|
|||
|
||||
PNS_ITEMSET headSet;
|
||||
|
||||
BOOST_FOREACH ( const PNS_ITEM* item, aHeadSet.CItems() )
|
||||
BOOST_FOREACH( const PNS_ITEM* item, aHeadSet.CItems() )
|
||||
{
|
||||
const PNS_LINE* headOrig = static_cast<const PNS_LINE*>( item );
|
||||
|
||||
|
@ -1169,7 +1169,7 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::ShoveMultiLines( const PNS_ITEMSET& aHeadSet
|
|||
m_currentNode->ClearRanks();
|
||||
int n = 0;
|
||||
|
||||
BOOST_FOREACH ( const PNS_ITEM* item, aHeadSet.CItems() )
|
||||
BOOST_FOREACH( const PNS_ITEM* item, aHeadSet.CItems() )
|
||||
{
|
||||
const PNS_LINE* headOrig = static_cast<const PNS_LINE*>( item );
|
||||
PNS_LINE head( *headOrig );
|
||||
|
@ -1180,7 +1180,8 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::ShoveMultiLines( const PNS_ITEMSET& aHeadSet
|
|||
head.Mark( MK_HEAD );
|
||||
head.SetRank( 100000 );
|
||||
n++;
|
||||
if ( !pushLine( head ) )
|
||||
|
||||
if( !pushLine( head ) )
|
||||
return SH_INCOMPLETE;
|
||||
|
||||
PNS_VIA* headVia = NULL;
|
||||
|
|
Loading…
Reference in New Issue