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
+4 -4
View File
@@ -233,12 +233,12 @@ const EDA_RECT PCB_GROUP::GetBoundingBox() const
}
INSPECT_RESULT PCB_GROUP::Visit( INSPECTOR aInspector, void* aTestData, const KICAD_T aScanTypes[] )
INSPECT_RESULT PCB_GROUP::Visit( INSPECTOR aInspector, void* aTestData,
const std::initializer_list<KICAD_T>& aScanTypes )
{
for( const KICAD_T* stype = aScanTypes; *stype != EOT; ++stype )
for( KICAD_T scanType : aScanTypes )
{
// If caller wants to inspect my type
if( *stype == Type() )
if( scanType == Type() )
{
if( INSPECT_RESULT::QUIT == aInspector( this, aTestData ) )
return INSPECT_RESULT::QUIT;