From 27ebcf3325121f9d6d215f434b49e57325b34c56 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Sat, 31 May 2014 16:04:25 +0200 Subject: [PATCH] PNS formatting code. --- pcbnew/router/pns_line_placer.cpp | 6 +++--- pcbnew/router/pns_router.cpp | 21 ++++++++++----------- pcbnew/router/router_tool.cpp | 2 +- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/pcbnew/router/pns_line_placer.cpp b/pcbnew/router/pns_line_placer.cpp index a0869dab9f..3b94a2ed1f 100644 --- a/pcbnew/router/pns_line_placer.cpp +++ b/pcbnew/router/pns_line_placer.cpp @@ -402,7 +402,7 @@ bool PNS_LINE_PLACER::handleViaPlacement( PNS_LINE& aHead ) } -bool PNS_LINE_PLACER::rhWalkOnly ( const VECTOR2I& aP, PNS_LINE& aNewHead ) +bool PNS_LINE_PLACER::rhWalkOnly( const VECTOR2I& aP, PNS_LINE& aNewHead ) { SHAPE_LINE_CHAIN line = m_direction.BuildInitialTrace( m_p_start, aP ); PNS_LINE initTrack( m_head, line ), walkFull; @@ -829,9 +829,9 @@ void PNS_LINE_PLACER::Move( const VECTOR2I& aP, PNS_ITEM* aEndItem ) if( !current.PointCount() ) m_currentEnd = m_p_start; else - m_currentEnd = current.CLine().CPoint(-1); + m_currentEnd = current.CLine().CPoint( -1 ); - PNS_NODE *latestNode = m_currentNode; + PNS_NODE* latestNode = m_currentNode; m_lastNode = latestNode->Branch(); if( eiDepth >= 0 && aEndItem && latestNode->Depth() > eiDepth && diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index a41c9b9b49..b45ec0deff 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -235,7 +235,6 @@ PNS_ITEM* PNS_ROUTER::syncVia( VIA* aVia ) aVia->GetDrillValue(), aVia->GetNetCode() ); - v->SetDrill ( aVia->GetDrill() ); v->SetParent( aVia ); return v; @@ -463,7 +462,7 @@ bool PNS_ROUTER::StartDragging( const VECTOR2I& aP, PNS_ITEM* aStartItem ) if( !aStartItem || aStartItem->OfKind( PNS_ITEM::SOLID ) ) return false; - m_dragger = new PNS_DRAGGER ( this ); + m_dragger = new PNS_DRAGGER( this ); m_dragger->SetWorld( m_world ); if( m_dragger->Start ( aP, aStartItem ) ) @@ -485,7 +484,7 @@ bool PNS_ROUTER::StartRouting( const VECTOR2I& aP, PNS_ITEM* aStartItem ) m_placer = new PNS_LINE_PLACER( this ); m_placer->SetLayer( m_currentLayer ); - m_placer->SetWidth ( m_settings.GetTrackWidth() ); + m_placer->SetWidth( m_settings.GetTrackWidth() ); m_placer->Start( aP, aStartItem ); m_currentEnd = aP; m_currentEndItem = NULL; @@ -575,7 +574,7 @@ void PNS_ROUTER::Move( const VECTOR2I& aP, PNS_ITEM* endItem ) break; case DRAG_SEGMENT: - moveDragging (aP, endItem ); + moveDragging( aP, endItem ); break; default: @@ -598,7 +597,7 @@ void PNS_ROUTER::moveDragging( const VECTOR2I& aP, PNS_ITEM* aEndItem ) void PNS_ROUTER::markViolations( PNS_NODE* aNode, PNS_ITEMSET& aCurrent, PNS_NODE::ITEM_VECTOR& aRemoved ) { - BOOST_FOREACH( PNS_ITEM *item, aCurrent.Items() ) + BOOST_FOREACH( PNS_ITEM* item, aCurrent.Items() ) { PNS_NODE::OBSTACLES obstacles; @@ -606,11 +605,11 @@ void PNS_ROUTER::markViolations( PNS_NODE* aNode, PNS_ITEMSET& aCurrent, if( item->OfKind( PNS_ITEM::LINE ) ) { - PNS_LINE *l = static_cast( item ); + PNS_LINE* l = static_cast( item ); if( l->EndsWithVia() ) { - PNS_VIA v ( l->Via() ); + PNS_VIA v( l->Via() ); aNode->QueryColliding( &v, obstacles, PNS_ITEM::ANY ); } } @@ -685,8 +684,8 @@ void PNS_ROUTER::movePlacing( const VECTOR2I& aP, PNS_ITEM* aEndItem ) if( current.EndsWithVia() ) DisplayItem( ¤t.Via() ); - PNS_ITEMSET tmp ( ¤t ); - updateView ( m_placer->CurrentNode ( true ), tmp ); + PNS_ITEMSET tmp( ¤t ); + updateView( m_placer->CurrentNode( true ), tmp ); } @@ -836,7 +835,7 @@ void PNS_ROUTER::FlipPosture() if( m_state == ROUTE_TRACK ) { m_placer->FlipPosture(); - m_placer->Move ( m_currentEnd, m_currentEndItem ); + m_placer->Move( m_currentEnd, m_currentEndItem ); } } @@ -915,5 +914,5 @@ void PNS_ROUTER::DumpLog() } if( logger ) - logger->Save ( "/tmp/shove.log" ); + logger->Save( "/tmp/shove.log" ); } diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 583fd477e4..c332b9a2ed 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -264,7 +264,7 @@ int ROUTER_TOOL::getDefaultWidth( int aNetCode ) void ROUTER_TOOL::getNetclassDimensions( int aNetCode, int& aWidth, -int& aViaDiameter, int& aViaDrill ) + int& aViaDiameter, int& aViaDrill ) { BOARD* board = getModel( PCB_T ); BOARD_DESIGN_SETTINGS &bds = board->GetDesignSettings();