Eeschema: more schematic part library plugin prep work.

* Remove unused sort and make upper case options from PART_LIB::GetEntryNames()
  and PART_LIB::GetEntryTypePowerNames() since they were never used anywhere in
  the code.  All comparisons are case sensitive and the array of names is always
  sorted.
This commit is contained in:
Wayne Stambaugh 2016-07-20 14:11:14 -04:00
parent 03e5208c5b
commit 78e4787297
2 changed files with 8 additions and 34 deletions

View File

@ -92,28 +92,18 @@ PART_LIB::~PART_LIB()
}
void PART_LIB::GetEntryNames( wxArrayString& aNames, bool aSort, bool aMakeUpperCase )
void PART_LIB::GetEntryNames( wxArrayString& aNames )
{
for( LIB_ALIAS_MAP::iterator it = m_amap.begin(); it!=m_amap.end(); it++ )
{
if( aMakeUpperCase )
{
wxString tmp = (*it).first;
tmp.MakeUpper();
aNames.Add( tmp );
}
else
{
aNames.Add( (*it).first );
}
aNames.Add( (*it).first );
}
if( aSort )
aNames.Sort();
aNames.Sort();
}
void PART_LIB::GetEntryTypePowerNames( wxArrayString& aNames, bool aSort, bool aMakeUpperCase )
void PART_LIB::GetEntryTypePowerNames( wxArrayString& aNames )
{
for( LIB_ALIAS_MAP::iterator it = m_amap.begin(); it!=m_amap.end(); it++ )
{
@ -123,20 +113,10 @@ void PART_LIB::GetEntryTypePowerNames( wxArrayString& aNames, bool aSort, bool a
if( !root || !root->IsPower() )
continue;
if( aMakeUpperCase )
{
wxString tmp = (*it).first;
tmp.MakeUpper();
aNames.Add( tmp );
}
else
{
aNames.Add( (*it).first );
}
aNames.Add( (*it).first );
}
if( aSort )
aNames.Sort();
aNames.Sort();
}

View File

@ -433,21 +433,15 @@ public:
* Load a string array with the names of all the entries in this library.
*
* @param aNames - String array to place entry names into.
* @param aSort - Sort names if true.
* @param aMakeUpperCase - Force entry names to upper case.
*/
void GetEntryNames( wxArrayString& aNames, bool aSort = true,
bool aMakeUpperCase = false );
void GetEntryNames( wxArrayString& aNames );
/**
* Load a string array with the names of entries of type POWER in this library.
*
* @param aNames - String array to place entry names into.
* @param aSort - Sort names if true.
* @param aMakeUpperCase - Force entry names to upper case.
*/
void GetEntryTypePowerNames( wxArrayString& aNames, bool aSort = true,
bool aMakeUpperCase = false );
void GetEntryTypePowerNames( wxArrayString& aNames );
/**
* Checks \a aPart for name conflict in the library.