Move KICAD_T[] to std::initializer_list<KICAD_T>.

This commit is contained in:
Jeff Young
2022-08-20 10:28:11 +01:00
parent 66b8ecb467
commit aa2ad3b44c
93 changed files with 1002 additions and 1813 deletions
+3 -5
View File
@@ -85,7 +85,7 @@ bool PAD_TOOL::Init()
SELECTION_CONDITION padSel = SELECTION_CONDITIONS::HasType( PCB_PAD_T );
SELECTION_CONDITION singlePadSel = SELECTION_CONDITIONS::Count( 1 ) &&
SELECTION_CONDITIONS::OnlyType( PCB_PAD_T );
SELECTION_CONDITIONS::OnlyTypes( { PCB_PAD_T } );
auto explodeCondition =
[&]( const SELECTION& aSel )
@@ -279,9 +279,7 @@ int PAD_TOOL::EnumeratePads( const TOOL_EVENT& aEvent )
if( !board()->GetFirstFootprint() || board()->GetFirstFootprint()->Pads().empty() )
return 0;
GENERAL_COLLECTOR collector;
const KICAD_T types[] = { PCB_PAD_T, EOT };
GENERAL_COLLECTOR collector;
GENERAL_COLLECTORS_GUIDE guide = frame()->GetCollectorsGuide();
guide.SetIgnoreMTextsMarkedNoShow( true );
guide.SetIgnoreMTextsOnBack( true );
@@ -384,7 +382,7 @@ int PAD_TOOL::EnumeratePads( const TOOL_EVENT& aEvent )
for( int j = 0; j < segments; ++j )
{
wxPoint testpoint( cursorPos.x - j * line_step.x, cursorPos.y - j * line_step.y );
collector.Collect( board(), types, testpoint, guide );
collector.Collect( board(), { PCB_PAD_T }, testpoint, guide );
for( int i = 0; i < collector.GetCount(); ++i )
selectedPads.push_back( static_cast<PAD*>( collector[i] ) );