COLLECTOR::BasePtr()

This commit is contained in:
dickelbeck 2008-01-25 15:13:57 +00:00
parent 9ba9be706e
commit 48dc3d0695
2 changed files with 12 additions and 2 deletions

View File

@ -131,6 +131,17 @@ public:
return NULL; return NULL;
} }
/**
* Function BasePtr
* returns the address of the first element in the array. Only call this
* if there is at least one element in the vector m_List, otherwise a
* C++ exception should get thrown.
*/
EDA_BaseStruct* const* BasePtr() const
{
return &m_List[0];
}
/** /**
* Function SetScanTypes * Function SetScanTypes

View File

@ -242,8 +242,7 @@ static void makePADSTACKs( BOARD* aBoard, TYPE_COLLECTOR& aPads,
{ {
if( aPads.GetCount() ) if( aPads.GetCount() )
{ {
#warning "uncomment next line asap" qsort( (void*) aPads.BasePtr(), aPads.GetCount(), sizeof(D_PAD*), Pad_list_Sort_by_Shapes );
//JPC qsort( (void*) aPads.BasePtr(), aPads.GetCount(), sizeof(D_PAD*), Pad_list_Sort_by_Shapes );
} }
D_PAD* old_pad = NULL; D_PAD* old_pad = NULL;