Fix more for loops making copies of iterates
This commit is contained in:
parent
1683e552f7
commit
44c2782d39
|
@ -105,7 +105,7 @@ void DIALOG_MIGRATE_BUSES::updateUi()
|
|||
m_migration_list->InsertColumn( 2, _( "New Label" ) );
|
||||
m_migration_list->InsertColumn( 3, _( "Status" ) );
|
||||
|
||||
for( auto item : m_items )
|
||||
for( auto& item : m_items )
|
||||
{
|
||||
wxString old = item.labels[0];
|
||||
for( unsigned j = 1; j < item.labels.size(); j++ )
|
||||
|
|
|
@ -767,7 +767,7 @@ void SCH_EAGLE_PLUGIN::loadSchematic( wxXmlNode* aSchematicNode )
|
|||
{
|
||||
const SCH_SYMBOL* origSymbol = cmp.second.cmp;
|
||||
|
||||
for( auto unitEntry : cmp.second.units )
|
||||
for( auto& unitEntry : cmp.second.units )
|
||||
{
|
||||
if( unitEntry.second == false )
|
||||
continue; // unit has been already processed
|
||||
|
|
|
@ -1377,7 +1377,7 @@ void SCH_LEGACY_PLUGIN_CACHE::SaveSymbol( LIB_SYMBOL* aSymbol, OUTPUTFORMATTER&
|
|||
|
||||
if( aMap )
|
||||
{
|
||||
for( auto entry : *aMap )
|
||||
for( auto& entry : *aMap )
|
||||
{
|
||||
LIB_SYMBOL* symbol = entry.second;
|
||||
|
||||
|
|
|
@ -1029,7 +1029,7 @@ bool SYMBOL_LIBRARY_MANAGER::LIB_BUFFER::SaveBuffer( std::shared_ptr<SYMBOL_BUFF
|
|||
|
||||
aLibTable->SaveSymbol( m_libName, parentSymbol );
|
||||
|
||||
for( auto entry : derivedSymbols )
|
||||
for( auto& entry : derivedSymbols )
|
||||
{
|
||||
std::shared_ptr<SYMBOL_BUFFER> symbol = GetBuffer( entry );
|
||||
|
||||
|
|
Loading…
Reference in New Issue