Cleanup.
This commit is contained in:
parent
346495ae31
commit
b79d2d9258
|
@ -22,7 +22,6 @@
|
|||
#include <undo_redo_container.h>
|
||||
#include <class_board.h>
|
||||
#include <board_connected_item.h>
|
||||
#include <class_module.h>
|
||||
#include <class_text_mod.h>
|
||||
#include <class_edge_mod.h>
|
||||
#include <class_track.h>
|
||||
|
@ -46,20 +45,15 @@
|
|||
#include <geometry/shape_rect.h>
|
||||
#include <geometry/shape_circle.h>
|
||||
#include <geometry/shape_arc.h>
|
||||
#include <geometry/convex_hull.h>
|
||||
|
||||
#include "tools/pcb_tool_base.h"
|
||||
|
||||
#include "pns_kicad_iface.h"
|
||||
|
||||
#include "../../include/geometry/shape_simple.h"
|
||||
#include "pns_routing_settings.h"
|
||||
#include "pns_sizes_settings.h"
|
||||
#include "pns_item.h"
|
||||
#include "pns_solid.h"
|
||||
#include "pns_segment.h"
|
||||
#include "pns_solid.h"
|
||||
#include "pns_itemset.h"
|
||||
#include "pns_node.h"
|
||||
#include "pns_topology.h"
|
||||
#include "pns_router.h"
|
||||
|
@ -88,7 +82,7 @@ private:
|
|||
};
|
||||
|
||||
int localPadClearance( const PNS::ITEM* aItem ) const;
|
||||
int matchDpSuffix( wxString aNetName, wxString& aComplementNet, wxString& aBaseDpName );
|
||||
int matchDpSuffix( const wxString& aNetName, wxString& aComplementNet, wxString& aBaseDpName );
|
||||
|
||||
PNS::ROUTER* m_router;
|
||||
BOARD* m_board;
|
||||
|
@ -212,7 +206,8 @@ int PNS_PCBNEW_RULE_RESOLVER::Clearance( int aNetCode ) const
|
|||
}
|
||||
|
||||
|
||||
int PNS_PCBNEW_RULE_RESOLVER::matchDpSuffix( wxString aNetName, wxString& aComplementNet, wxString& aBaseDpName )
|
||||
int PNS_PCBNEW_RULE_RESOLVER::matchDpSuffix( const wxString& aNetName, wxString& aComplementNet,
|
||||
wxString& aBaseDpName )
|
||||
{
|
||||
int rv = 0;
|
||||
|
||||
|
|
|
@ -25,9 +25,7 @@
|
|||
#include <math/vector2d.h>
|
||||
|
||||
#include <geometry/seg.h>
|
||||
#include <geometry/shape.h>
|
||||
#include <geometry/shape_line_chain.h>
|
||||
#include <geometry/shape_index.h>
|
||||
|
||||
#include "pns_item.h"
|
||||
#include "pns_line.h"
|
||||
|
@ -36,7 +34,6 @@
|
|||
#include "pns_solid.h"
|
||||
#include "pns_joint.h"
|
||||
#include "pns_index.h"
|
||||
#include "pns_router.h"
|
||||
|
||||
|
||||
namespace PNS {
|
||||
|
@ -83,10 +80,10 @@ NODE::~NODE()
|
|||
|
||||
m_joints.clear();
|
||||
|
||||
for( INDEX::ITEM_SET::iterator i = m_index->begin(); i != m_index->end(); ++i )
|
||||
for( ITEM* item : *m_index )
|
||||
{
|
||||
if( (*i)->BelongsTo( this ) )
|
||||
delete *i;
|
||||
if( item->BelongsTo( this ) )
|
||||
delete item;
|
||||
}
|
||||
|
||||
releaseGarbage();
|
||||
|
@ -118,15 +115,14 @@ NODE* NODE::Branch()
|
|||
child->m_root = isRoot() ? this : m_root;
|
||||
child->m_maxClearance = m_maxClearance;
|
||||
|
||||
// immmediate offspring of the root branch needs not copy anything.
|
||||
// For the rest, deep-copy joints, overridden item map and pointers
|
||||
// to stored items.
|
||||
// Immmediate offspring of the root branch needs not copy anything. For the rest, deep-copy
|
||||
// joints, overridden item maps and pointers to stored items.
|
||||
if( !isRoot() )
|
||||
{
|
||||
JOINT_MAP::iterator j;
|
||||
|
||||
for( INDEX::ITEM_SET::iterator i = m_index->begin(); i != m_index->end(); ++i )
|
||||
child->m_index->Add( *i );
|
||||
for( ITEM* item : *m_index )
|
||||
child->m_index->Add( item );
|
||||
|
||||
child->m_joints = m_joints;
|
||||
child->m_override = m_override;
|
||||
|
@ -154,7 +150,6 @@ OBSTACLE_VISITOR::OBSTACLE_VISITOR( const ITEM* aItem ) :
|
|||
m_override( NULL ),
|
||||
m_extraClearance( 0 )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -330,9 +325,9 @@ NODE::OPT_OBSTACLE NODE::NearestObstacle( const LINE* aItem, int aKindMask,
|
|||
nearest.m_item = NULL;
|
||||
nearest.m_distFirst = INT_MAX;
|
||||
|
||||
for( OBSTACLE obs : obs_list )
|
||||
for( const OBSTACLE& obs : obs_list )
|
||||
{
|
||||
VECTOR2I ip_first, ip_last;
|
||||
VECTOR2I ip_last;
|
||||
int dist_max = INT_MIN;
|
||||
|
||||
if( aRestrictedSet && aRestrictedSet->find( obs.m_item ) == aRestrictedSet->end() )
|
||||
|
|
Loading…
Reference in New Issue