Use references instead of copies in map pair for loops.
This commit is contained in:
parent
98e55c0a04
commit
95828ff2e2
|
@ -567,7 +567,7 @@ int DIALOG_CHANGE_SYMBOLS::processSymbols( const std::map<SCH_SYMBOL*,
|
|||
|
||||
// Removing the symbol needs to be done before the LIB_SYMBOL is changed to prevent stale
|
||||
// library symbols in the schematic file.
|
||||
for( auto pair : symbols )
|
||||
for( auto& pair : symbols )
|
||||
{
|
||||
symbol = pair.first;
|
||||
instances = pair.second;
|
||||
|
@ -582,7 +582,7 @@ int DIALOG_CHANGE_SYMBOLS::processSymbols( const std::map<SCH_SYMBOL*,
|
|||
frame->SaveCopyInUndoList( screen, symbol, UNDO_REDO::CHANGED, true );
|
||||
}
|
||||
|
||||
for( auto pair : symbols )
|
||||
for( auto& pair : symbols )
|
||||
{
|
||||
symbol = pair.first;
|
||||
|
||||
|
|
Loading…
Reference in New Issue