Commit ea4b3877 authored by Dick Hollenbeck's avatar Dick Hollenbeck

move wxString constructor outside loop for speed

parent 28222961
......@@ -1054,18 +1054,18 @@ void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const
if( m_board )
layerMask &= m_board->GetEnabledLayers();
wxString layerName;
for( int layer = 0; layerMask; ++layer, layerMask >>= 1 )
{
if( layerMask & 1 )
{
wxString layerName;
if( m_board )
layerName = m_board->GetLayerName( layer );
else
layerName = BOARD::GetDefaultLayerName( layer, true );
m_out->Print( 0, " %s", m_out->Quotew(layerName ).c_str() );
m_out->Print( 0, " %s", m_out->Quotew( layerName ).c_str() );
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment