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
+7 -12
View File
@@ -406,17 +406,6 @@ void EE_POINT_EDITOR::updateEditedPoint( const TOOL_EVENT& aEvent )
int EE_POINT_EDITOR::Main( const TOOL_EVENT& aEvent )
{
static KICAD_T supportedTypes[] = {
LIB_SHAPE_T,
LIB_TEXTBOX_T,
SCH_SHAPE_T,
SCH_TEXTBOX_T,
SCH_SHEET_T,
SCH_ITEM_LOCATE_GRAPHIC_LINE_T,
SCH_BITMAP_T,
EOT
};
if( !m_selectionTool )
return 0;
@@ -430,8 +419,14 @@ int EE_POINT_EDITOR::Main( const TOOL_EVENT& aEvent )
const EE_SELECTION& selection = m_selectionTool->GetSelection();
if( selection.Size() != 1 || !selection.Front()->IsType( supportedTypes ) )
if( selection.Size() != 1 || !selection.Front()->IsType( { LIB_SHAPE_T, SCH_SHAPE_T,
LIB_TEXTBOX_T, SCH_TEXTBOX_T,
SCH_SHEET_T,
SCH_ITEM_LOCATE_GRAPHIC_LINE_T,
SCH_BITMAP_T } ) )
{
return 0;
}
// Wait till drawing tool is done
if( selection.Front()->IsNew() )