PNS code formatting.
This commit is contained in:
parent
7f1f436a4e
commit
b16ade0805
|
@ -202,7 +202,7 @@ public:
|
||||||
|
|
||||||
PNS_SEGMENT* GetLink( int aIndex ) const
|
PNS_SEGMENT* GetLink( int aIndex ) const
|
||||||
{
|
{
|
||||||
return (*m_segmentRefs) [ aIndex ];
|
return (*m_segmentRefs)[aIndex];
|
||||||
}
|
}
|
||||||
|
|
||||||
///> Erases the linking information. Used to detach the line from the owning node.
|
///> Erases the linking information. Used to detach the line from the owning node.
|
||||||
|
|
|
@ -425,7 +425,7 @@ bool PNS_LINE_PLACER::rhMarkObstacles( const VECTOR2I& aP, PNS_LINE& aNewHead )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool PNS_LINE_PLACER::rhShoveOnly ( const VECTOR2I& aP, PNS_LINE& aNewHead )
|
bool PNS_LINE_PLACER::rhShoveOnly( const VECTOR2I& aP, PNS_LINE& aNewHead )
|
||||||
{
|
{
|
||||||
PNS_LINE initTrack( m_head );
|
PNS_LINE initTrack( m_head );
|
||||||
PNS_LINE walkSolids, l2;
|
PNS_LINE walkSolids, l2;
|
||||||
|
@ -965,7 +965,7 @@ void PNS_LINE_PLACER::removeLoops( PNS_NODE* aNode, PNS_LINE* aLatest )
|
||||||
if( !( line->ContainsSegment( seg ) ) && line->SegmentCount() )
|
if( !( line->ContainsSegment( seg ) ) && line->SegmentCount() )
|
||||||
{
|
{
|
||||||
aNode->Remove( line );
|
aNode->Remove( line );
|
||||||
removedCount ++;
|
removedCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -216,11 +216,11 @@ struct PNS_NODE::OBSTACLE_VISITOR
|
||||||
|
|
||||||
int clearance = m_extraClearance + m_node->GetClearance( aItem, m_item );
|
int clearance = m_extraClearance + m_node->GetClearance( aItem, m_item );
|
||||||
|
|
||||||
if( m_node->m_collisionFilter && (*m_node->m_collisionFilter)(aItem, m_item))
|
if( m_node->m_collisionFilter && (*m_node->m_collisionFilter)( aItem, m_item ) )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if( aItem->Kind() == PNS_ITEM::LINE )
|
if( aItem->Kind() == PNS_ITEM::LINE )
|
||||||
clearance += static_cast<PNS_LINE *>(aItem)->Width() / 2;
|
clearance += static_cast<PNS_LINE*>( aItem )->Width() / 2;
|
||||||
|
|
||||||
if( !aItem->Collide( m_item, clearance ) )
|
if( !aItem->Collide( m_item, clearance ) )
|
||||||
return true;
|
return true;
|
||||||
|
@ -705,7 +705,7 @@ void PNS_NODE::Remove( PNS_ITEM* aItem )
|
||||||
{
|
{
|
||||||
case PNS_ITEM::SOLID:
|
case PNS_ITEM::SOLID:
|
||||||
// fixme: this fucks up the joints, but it's only used for marking colliding obstacles for the moment, so we don't care.
|
// fixme: this fucks up the joints, but it's only used for marking colliding obstacles for the moment, so we don't care.
|
||||||
doRemove ( aItem );
|
doRemove( aItem );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PNS_ITEM::SEGMENT:
|
case PNS_ITEM::SEGMENT:
|
||||||
|
@ -1122,7 +1122,7 @@ void PNS_NODE::Commit( PNS_NODE* aNode )
|
||||||
if( aNode->isRoot() )
|
if( aNode->isRoot() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
BOOST_FOREACH( PNS_ITEM * item, aNode->m_override )
|
BOOST_FOREACH( PNS_ITEM* item, aNode->m_override )
|
||||||
Remove( item );
|
Remove( item );
|
||||||
|
|
||||||
for( PNS_INDEX::ITEM_SET::iterator i = aNode->m_index->begin();
|
for( PNS_INDEX::ITEM_SET::iterator i = aNode->m_index->begin();
|
||||||
|
|
|
@ -53,14 +53,14 @@ public:
|
||||||
m_layers = aParentLine.Layers();
|
m_layers = aParentLine.Layers();
|
||||||
m_marker = aParentLine.Marker();
|
m_marker = aParentLine.Marker();
|
||||||
m_rank = aParentLine.Rank();
|
m_rank = aParentLine.Rank();
|
||||||
};
|
}
|
||||||
|
|
||||||
static inline bool ClassOf( const PNS_ITEM* aItem )
|
static inline bool ClassOf( const PNS_ITEM* aItem )
|
||||||
{
|
{
|
||||||
return aItem && SEGMENT == aItem->Kind();
|
return aItem && SEGMENT == aItem->Kind();
|
||||||
}
|
}
|
||||||
|
|
||||||
PNS_SEGMENT* Clone( ) const;
|
PNS_SEGMENT* Clone() const;
|
||||||
|
|
||||||
const SHAPE* Shape() const
|
const SHAPE* Shape() const
|
||||||
{
|
{
|
||||||
|
@ -110,7 +110,7 @@ public:
|
||||||
|
|
||||||
const SHAPE_LINE_CHAIN Hull( int aClearance, int aWalkaroundThickness ) const;
|
const SHAPE_LINE_CHAIN Hull( int aClearance, int aWalkaroundThickness ) const;
|
||||||
|
|
||||||
virtual VECTOR2I Anchor(int n) const
|
virtual VECTOR2I Anchor( int n ) const
|
||||||
{
|
{
|
||||||
if( n == 0 )
|
if( n == 0 )
|
||||||
return m_seg.GetSeg().A;
|
return m_seg.GetSeg().A;
|
||||||
|
|
|
@ -1210,7 +1210,7 @@ void PNS_SHOVE::runOptimizer( PNS_NODE* aNode, PNS_LINE* aHead )
|
||||||
for( std::vector<PNS_LINE*>::iterator i = m_optimizerQueue.begin();
|
for( std::vector<PNS_LINE*>::iterator i = m_optimizerQueue.begin();
|
||||||
i != m_optimizerQueue.end(); ++i )
|
i != m_optimizerQueue.end(); ++i )
|
||||||
{
|
{
|
||||||
maxWidth = std::max ( (*i)->Width(), maxWidth );
|
maxWidth = std::max( (*i)->Width(), maxWidth );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( area )
|
if( area )
|
||||||
|
@ -1244,7 +1244,7 @@ void PNS_SHOVE::runOptimizer( PNS_NODE* aNode, PNS_LINE* aHead )
|
||||||
}
|
}
|
||||||
|
|
||||||
if( Settings().SmartPads() )
|
if( Settings().SmartPads() )
|
||||||
optFlags |= PNS_OPTIMIZER::SMART_PADS ;
|
optFlags |= PNS_OPTIMIZER::SMART_PADS;
|
||||||
|
|
||||||
optimizer.SetEffortLevel( optFlags );
|
optimizer.SetEffortLevel( optFlags );
|
||||||
optimizer.SetCollisionMask( PNS_ITEM::ANY );
|
optimizer.SetCollisionMask( PNS_ITEM::ANY );
|
||||||
|
|
Loading…
Reference in New Issue