Use references instead of copies in map pair for loops.
This commit is contained in:
parent
9e03a71b44
commit
a94d8a7e78
|
@ -561,7 +561,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;
|
||||
|
@ -576,7 +576,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