Cleanup and code clarity.

This commit is contained in:
Jeff Young 2022-02-16 12:00:18 +00:00
parent bc7742cb2e
commit 3b292a4941
3 changed files with 12 additions and 17 deletions

View File

@ -485,27 +485,22 @@ void CN_CONNECTIVITY_ALGO::Build( BOARD* aBoard, PROGRESS_REPORTER* aReporter )
}
void CN_CONNECTIVITY_ALGO::Build( const std::vector<BOARD_ITEM*>& aItems )
void CN_CONNECTIVITY_ALGO::LocalBuild( const std::vector<BOARD_ITEM*>& aItems )
{
for( BOARD_ITEM* item : aItems )
{
switch( item->Type() )
{
case PCB_TRACE_T:
case PCB_ARC_T:
case PCB_VIA_T:
case PCB_PAD_T:
Add( item );
break;
case PCB_TRACE_T:
case PCB_ARC_T:
case PCB_VIA_T:
case PCB_PAD_T:
case PCB_FOOTPRINT_T:
Add( item );
break;
case PCB_FOOTPRINT_T:
for( PAD* pad : static_cast<FOOTPRINT*>( item )->Pads() )
Add( pad );
break;
default:
break;
default:
break;
}
}
}

View File

@ -194,7 +194,7 @@ public:
}
void Build( BOARD* aBoard, PROGRESS_REPORTER* aReporter = nullptr );
void Build( const std::vector<BOARD_ITEM*>& aItems );
void LocalBuild( const std::vector<BOARD_ITEM*>& aItems );
void Clear();

View File

@ -134,7 +134,7 @@ void CONNECTIVITY_DATA::Build( const std::vector<BOARD_ITEM*>& aItems )
return;
m_connAlgo.reset( new CN_CONNECTIVITY_ALGO );
m_connAlgo->Build( aItems );
m_connAlgo->LocalBuild( aItems );
RecalculateRatsnest();
}