Use references instead of copies in map pair for loops.

This commit is contained in:
Wayne Stambaugh 2023-02-03 10:04:08 -05:00
parent 98e55c0a04
commit 95828ff2e2
1 changed files with 2 additions and 2 deletions

View File

@ -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;