Removed BOARD::AppendNet()

It is handled by BOARD::Add() now.
This commit is contained in:
Maciej Suminski 2016-09-05 12:22:24 +02:00
parent 77f74646af
commit 0cc2c87ef8
7 changed files with 8 additions and 18 deletions

View File

@ -2595,7 +2595,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets,
{
// It is a new net, we have to add it
netinfo = new NETINFO_ITEM( this, net.GetNetName() );
m_NetInfo.AppendNet( netinfo );
Add( netinfo );
}
pad->SetNetCode( netinfo->GetNet() );

View File

@ -784,16 +784,6 @@ public:
*/
NETINFO_ITEM* FindNet( const wxString& aNetname ) const;
/**
* Function AppendNet
* adds a new net description item to the current board.
* @param aNewNet is the new description item.
*/
void AppendNet( NETINFO_ITEM* aNewNet )
{
m_NetInfo.AppendNet( aNewNet );
}
NETINFO_LIST& GetNetInfo()
{
return m_NetInfo;

View File

@ -2622,7 +2622,7 @@ void EAGLE_PLUGIN::loadSignals( CPTREE& aSignals )
const string& nname = net->second.get<string>( "<xmlattr>.name" );
wxString netName = FROM_UTF8( nname.c_str() );
m_board->AppendNet( new NETINFO_ITEM( m_board, netName, netCode ) );
m_board->Add( new NETINFO_ITEM( m_board, netName, netCode ) );
m_xpath->Value( nname.c_str() );

View File

@ -2080,7 +2080,7 @@ void LEGACY_PLUGIN::loadNETINFO_ITEM()
// if it is not the net 0, or if the net 0 does not exists.
if( net && ( net->GetNet() > 0 || m_board->FindNet( 0 ) == NULL ) )
{
m_board->AppendNet( net );
m_board->Add( net );
// Be sure we have room to store the net in m_netCodes
if( (int)m_netCodes.size() <= netCode )

View File

@ -925,7 +925,7 @@ void PCB::AddToBoard()
{
net = m_pcbNetlist[i];
m_board->AppendNet( new NETINFO_ITEM( m_board, net->m_name, net->m_netCode ) );
m_board->Add( new NETINFO_ITEM( m_board, net->m_name, net->m_netCode ) );
}
for( i = 0; i < (int) m_pcbComponents.GetCount(); i++ )

View File

@ -278,7 +278,7 @@ void PCB_PAD::AddToModule( MODULE* aModule, int aRotation, bool aEncapsulatedPad
{
// It is a new net
netinfo = new NETINFO_ITEM( m_board, m_net );
m_board->AppendNet( netinfo );
m_board->Add( netinfo );
}
pad->SetNetCode( netinfo->GetNet() );

View File

@ -1242,10 +1242,10 @@ void PCB_PARSER::parseNETINFO_ITEM() throw( IO_ERROR, PARSE_ERROR )
// net 0 should be already in list, so store this net
// if it is not the net 0, or if the net 0 does not exists.
// (TODO: a better test.)
if( netCode > 0 || m_board->FindNet( 0 ) == NULL )
if( netCode > NETINFO_LIST::UNCONNECTED || !m_board->FindNet( NETINFO_LIST::UNCONNECTED ) )
{
NETINFO_ITEM* net = new NETINFO_ITEM( m_board, name, netCode );
m_board->AppendNet( net );
m_board->Add( net );
// Store the new code mapping
pushValueIntoMap( netCode, net->GetNet() );
@ -2988,7 +2988,7 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR )
{
int newnetcode = m_board->GetNetCount();
net = new NETINFO_ITEM( m_board, netnameFromfile, newnetcode );
m_board->AppendNet( net );
m_board->Add( net );
// Store the new code mapping
pushValueIntoMap( newnetcode, net->GetNet() );