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:
parent
03e5208c5b
commit
78e4787297
|
@ -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++ )
|
for( LIB_ALIAS_MAP::iterator it = m_amap.begin(); it!=m_amap.end(); it++ )
|
||||||
{
|
{
|
||||||
if( aMakeUpperCase )
|
aNames.Add( (*it).first );
|
||||||
{
|
|
||||||
wxString tmp = (*it).first;
|
|
||||||
tmp.MakeUpper();
|
|
||||||
aNames.Add( tmp );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
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++ )
|
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() )
|
if( !root || !root->IsPower() )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if( aMakeUpperCase )
|
aNames.Add( (*it).first );
|
||||||
{
|
|
||||||
wxString tmp = (*it).first;
|
|
||||||
tmp.MakeUpper();
|
|
||||||
aNames.Add( tmp );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
aNames.Add( (*it).first );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( aSort )
|
aNames.Sort();
|
||||||
aNames.Sort();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -433,21 +433,15 @@ public:
|
||||||
* Load a string array with the names of all the entries in this library.
|
* Load a string array with the names of all the entries in this library.
|
||||||
*
|
*
|
||||||
* @param aNames - String array to place entry names into.
|
* @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,
|
void GetEntryNames( wxArrayString& aNames );
|
||||||
bool aMakeUpperCase = false );
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load a string array with the names of entries of type POWER in this library.
|
* 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 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,
|
void GetEntryTypePowerNames( wxArrayString& aNames );
|
||||||
bool aMakeUpperCase = false );
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks \a aPart for name conflict in the library.
|
* Checks \a aPart for name conflict in the library.
|
||||||
|
|
Loading…
Reference in New Issue