Eeschema: remove dead code from LIB_PART object.
(cherry picked from commit 9020a3a26c
)
This commit is contained in:
parent
e8ab661504
commit
2a9412042c
|
@ -64,9 +64,7 @@ int LIB_PART::m_subpartFirstId = 'A';
|
|||
|
||||
LIB_ALIAS::LIB_ALIAS( const wxString& aName, LIB_PART* aRootPart ) :
|
||||
EDA_ITEM( LIB_ALIAS_T ),
|
||||
shared( aRootPart ),
|
||||
tmpUnit( 0 ),
|
||||
tmpConversion( 0 )
|
||||
shared( aRootPart )
|
||||
{
|
||||
SetName( aName );
|
||||
}
|
||||
|
@ -74,9 +72,7 @@ LIB_ALIAS::LIB_ALIAS( const wxString& aName, LIB_PART* aRootPart ) :
|
|||
|
||||
LIB_ALIAS::LIB_ALIAS( const LIB_ALIAS& aAlias, LIB_PART* aRootPart ) :
|
||||
EDA_ITEM( aAlias ),
|
||||
shared( aRootPart ),
|
||||
tmpUnit( 0 ),
|
||||
tmpConversion( 0 )
|
||||
shared( aRootPart )
|
||||
{
|
||||
name = aAlias.name;
|
||||
|
||||
|
@ -931,45 +927,6 @@ LIB_FIELD& LIB_PART::GetFootprintField()
|
|||
}
|
||||
|
||||
|
||||
bool LIB_PART::SaveDateAndTime( OUTPUTFORMATTER& aFormatter )
|
||||
{
|
||||
int year, mon, day, hour, min, sec;
|
||||
|
||||
if( m_dateLastEdition == 0 )
|
||||
return true;
|
||||
|
||||
sec = m_dateLastEdition & 63;
|
||||
min = ( m_dateLastEdition >> 6 ) & 63;
|
||||
hour = ( m_dateLastEdition >> 12 ) & 31;
|
||||
day = ( m_dateLastEdition >> 17 ) & 31;
|
||||
mon = ( m_dateLastEdition >> 22 ) & 15;
|
||||
year = ( m_dateLastEdition >> 26 ) + 1990;
|
||||
|
||||
aFormatter.Print( 0, "Ti %d/%d/%d %d:%d:%d\n", year, mon, day, hour, min, sec );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool LIB_PART::LoadDateAndTime( char* aLine )
|
||||
{
|
||||
int year, mon, day, hour, min, sec;
|
||||
|
||||
year = mon = day = hour = min = sec = 0;
|
||||
strtok( aLine, " \r\t\n" );
|
||||
strtok( NULL, " \r\t\n" );
|
||||
|
||||
if( sscanf( aLine, "%d/%d/%d %d:%d:%d", &year, &mon, &day, &hour, &min, &sec ) != 6 )
|
||||
return false;
|
||||
|
||||
m_dateLastEdition = ( sec & 63 ) + ( ( min & 63 ) << 6 ) +
|
||||
( ( hour & 31 ) << 12 ) + ( ( day & 31 ) << 17 ) +
|
||||
( ( mon & 15 ) << 22 ) + ( ( year - 1990 ) << 26 );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void LIB_PART::SetOffset( const wxPoint& aOffset )
|
||||
{
|
||||
for( LIB_ITEM& item : m_drawings )
|
||||
|
|
|
@ -87,9 +87,6 @@ protected:
|
|||
wxString keyWords; ///< keyword list (used for search for parts by keyword)
|
||||
wxString docFileName; ///< Associate doc file name
|
||||
|
||||
int tmpUnit; ///< Temporary unit designator (used for rendering)
|
||||
int tmpConversion; ///< Temporary conversion designator (used for rendering)
|
||||
|
||||
public:
|
||||
LIB_ALIAS( const wxString& aName, LIB_PART* aRootComponent );
|
||||
LIB_ALIAS( const LIB_ALIAS& aAlias, LIB_PART* aRootComponent = NULL );
|
||||
|
@ -174,12 +171,6 @@ public:
|
|||
*/
|
||||
wxString GetUnitReference( int aUnit ) override;
|
||||
|
||||
/**
|
||||
* A temporary conversion (deMorgan) designation for rendering, preview, etc.
|
||||
*/
|
||||
void SetTmpConversion( int aConversion ) { tmpConversion = aConversion; }
|
||||
int GetTmpConversion() { return tmpConversion; }
|
||||
|
||||
/**
|
||||
* KEEPCASE sensitive comparison of the part entry name.
|
||||
*/
|
||||
|
@ -272,8 +263,6 @@ class LIB_PART : public EDA_ITEM
|
|||
private:
|
||||
void deleteAllFields();
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
LIB_PART( const wxString& aName, PART_LIB* aLibrary = NULL );
|
||||
|
@ -377,26 +366,6 @@ public:
|
|||
return GetUnitBoundingBox( 0, 0 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Write the date and time of part to \a aFile in the format:
|
||||
* "Ti yy/mm/jj hh:mm:ss"
|
||||
*
|
||||
* @param aFormatter A reference to an #OUTPUTFORMATTER object containing the
|
||||
* output format to write to.
|
||||
* @return True if the date and time were successfully written to \a aFormatter.
|
||||
*/
|
||||
bool SaveDateAndTime( OUTPUTFORMATTER& aFormatter );
|
||||
|
||||
bool LoadDateAndTime( char* aLine );
|
||||
|
||||
/**
|
||||
* Write the data structures out to \a aFormatter in the part library "*.lib" format.
|
||||
*
|
||||
* @param aFormatter A reference to an OUTPUTFORMATTER to write to.
|
||||
* @return True if success writing else false.
|
||||
*/
|
||||
bool Save( OUTPUTFORMATTER& aFormatter );
|
||||
|
||||
bool IsPower() const { return m_options == ENTRY_POWER; }
|
||||
bool IsNormal() const { return m_options == ENTRY_NORMAL; }
|
||||
|
||||
|
|
Loading…
Reference in New Issue