Code formatting.
This commit is contained in:
parent
a6c94e26f6
commit
127fcfa7c9
|
@ -50,8 +50,9 @@ enum LineMarker {
|
|||
class PNS_OBJECT
|
||||
{
|
||||
public:
|
||||
PNS_OBJECT ():
|
||||
m_owner(NULL) {};
|
||||
PNS_OBJECT():
|
||||
m_owner( NULL ) {}
|
||||
|
||||
~PNS_OBJECT() {};
|
||||
|
||||
/**
|
||||
|
@ -83,7 +84,7 @@ public:
|
|||
PNS_OBJECT* Owner() const { return m_owner; }
|
||||
|
||||
protected:
|
||||
PNS_OBJECT *m_owner;
|
||||
PNS_OBJECT* m_owner;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ public:
|
|||
|
||||
void Clear()
|
||||
{
|
||||
BOOST_FOREACH( PNS_ITEM *item, m_items )
|
||||
BOOST_FOREACH( PNS_ITEM* item, m_items )
|
||||
{
|
||||
if( item->BelongsTo( this ) )
|
||||
delete item;
|
||||
|
@ -168,24 +168,24 @@ public:
|
|||
}
|
||||
|
||||
template<class T>
|
||||
T* FindByKind( PNS_ITEM::PnsKind kind, int index = 0 )
|
||||
T* FindByKind( PNS_ITEM::PnsKind kind, int index = 0 )
|
||||
{
|
||||
int n = 0;
|
||||
|
||||
BOOST_FOREACH( PNS_ITEM* item, m_items )
|
||||
{
|
||||
int n = 0;
|
||||
|
||||
BOOST_FOREACH( PNS_ITEM* item, m_items )
|
||||
if( item->OfKind( kind ) )
|
||||
{
|
||||
if( item->OfKind (kind) )
|
||||
{
|
||||
if( index == n )
|
||||
return static_cast<T*>( item );
|
||||
else
|
||||
n++;
|
||||
}
|
||||
if( index == n )
|
||||
return static_cast<T*>( item );
|
||||
else
|
||||
n++;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
private:
|
||||
void release();
|
||||
|
||||
|
@ -193,7 +193,7 @@ private:
|
|||
{
|
||||
release();
|
||||
|
||||
BOOST_FOREACH( PNS_ITEM *item, aOther.m_items )
|
||||
BOOST_FOREACH( PNS_ITEM* item, aOther.m_items )
|
||||
{
|
||||
if( item->BelongsTo( &aOther ) )
|
||||
m_items.push_back( item->Clone() );
|
||||
|
|
|
@ -38,16 +38,16 @@ PNS_LINE::PNS_LINE( const PNS_LINE& aOther ) :
|
|||
m_line( aOther.m_line ),
|
||||
m_width( aOther.m_width )
|
||||
{
|
||||
m_net = aOther.m_net;
|
||||
m_movable = aOther.m_movable;
|
||||
m_layers = aOther.m_layers;
|
||||
m_owner = aOther.m_owner;
|
||||
m_via = aOther.m_via;
|
||||
m_hasVia = aOther.m_hasVia;
|
||||
m_marker = aOther.m_marker;
|
||||
m_rank = aOther.m_rank;
|
||||
m_net = aOther.m_net;
|
||||
m_movable = aOther.m_movable;
|
||||
m_layers = aOther.m_layers;
|
||||
m_owner = NULL;
|
||||
m_via = aOther.m_via;
|
||||
m_hasVia = aOther.m_hasVia;
|
||||
m_marker = aOther.m_marker;
|
||||
m_rank = aOther.m_rank;
|
||||
|
||||
copyLinks( &aOther );
|
||||
copyLinks( &aOther );
|
||||
}
|
||||
|
||||
|
||||
|
@ -137,7 +137,7 @@ void PNS_LINE::copyLinks( const PNS_LINE* aParent )
|
|||
}
|
||||
|
||||
|
||||
PNS_SEGMENT* PNS_SEGMENT::Clone( ) const
|
||||
PNS_SEGMENT* PNS_SEGMENT::Clone() const
|
||||
{
|
||||
PNS_SEGMENT* s = new PNS_SEGMENT;
|
||||
|
||||
|
|
|
@ -1110,13 +1110,12 @@ void PNS_NODE::GetUpdatedItems( ITEM_VECTOR& aRemoved, ITEM_VECTOR& aAdded )
|
|||
aAdded.push_back( *i );
|
||||
}
|
||||
|
||||
|
||||
void PNS_NODE::releaseChildren()
|
||||
{
|
||||
// copy the kids as the PNS_NODE destructor erases the item from the parent node.
|
||||
std::vector<PNS_NODE*> kids = m_children;
|
||||
|
||||
BOOST_FOREACH( PNS_NODE * node, kids )
|
||||
BOOST_FOREACH( PNS_NODE* node, kids )
|
||||
{
|
||||
node->releaseChildren();
|
||||
delete node;
|
||||
|
@ -1126,7 +1125,7 @@ void PNS_NODE::releaseChildren()
|
|||
|
||||
void PNS_NODE::releaseGarbage()
|
||||
{
|
||||
if( !isRoot( ) )
|
||||
if( !isRoot() )
|
||||
return;
|
||||
|
||||
BOOST_FOREACH( PNS_ITEM* item, m_garbageItems )
|
||||
|
@ -1162,7 +1161,7 @@ void PNS_NODE::Commit( PNS_NODE* aNode )
|
|||
|
||||
void PNS_NODE::KillChildren()
|
||||
{
|
||||
assert ( isRoot() );
|
||||
assert( isRoot() );
|
||||
releaseChildren();
|
||||
}
|
||||
|
||||
|
|
|
@ -135,8 +135,8 @@ public:
|
|||
typedef std::vector<PNS_ITEM*> ITEM_VECTOR;
|
||||
typedef std::vector<PNS_OBSTACLE> OBSTACLES;
|
||||
|
||||
PNS_NODE ();
|
||||
~PNS_NODE ();
|
||||
PNS_NODE();
|
||||
~PNS_NODE();
|
||||
|
||||
///> Returns the expected clearance between items a and b.
|
||||
int GetClearance( const PNS_ITEM* aA, const PNS_ITEM* aB ) const;
|
||||
|
@ -426,7 +426,7 @@ private:
|
|||
return m_override.find( aItem ) != m_override.end();
|
||||
}
|
||||
|
||||
PNS_SEGMENT *findRedundantSegment ( PNS_SEGMENT* aSeg );
|
||||
PNS_SEGMENT* findRedundantSegment( PNS_SEGMENT* aSeg );
|
||||
|
||||
///> scans the joint map, forming a line starting from segment (current).
|
||||
void followLine( PNS_SEGMENT* aCurrent,
|
||||
|
@ -466,7 +466,7 @@ private:
|
|||
int m_depth;
|
||||
|
||||
///> optional collision filtering object
|
||||
PNS_COLLISION_FILTER *m_collisionFilter;
|
||||
PNS_COLLISION_FILTER* m_collisionFilter;
|
||||
|
||||
boost::unordered_set<PNS_ITEM*> m_garbageItems;
|
||||
};
|
||||
|
|
|
@ -78,7 +78,7 @@ const SHAPE_LINE_CHAIN PNS_VIA::Hull( int aClearance, int aWalkaroundThickness )
|
|||
}
|
||||
|
||||
|
||||
PNS_VIA* PNS_VIA::Clone ( ) const
|
||||
PNS_VIA* PNS_VIA::Clone() const
|
||||
{
|
||||
PNS_VIA* v = new PNS_VIA();
|
||||
|
||||
|
|
Loading…
Reference in New Issue