Don't make a copy when looping

This commit is contained in:
Ian McInerney 2021-05-06 21:56:21 +01:00
parent cda70a66c3
commit 5378cacee3
1 changed files with 2 additions and 2 deletions

View File

@ -1405,12 +1405,12 @@ void SCH_EDITOR_CONTROL::setClipboardInstances( const SCH_SCREEN* aPastedScreen
{
m_clipboardSheetInstances.clear();
for( const SCH_SHEET_INSTANCE sheet : aPastedScreen->GetSheetInstances() )
for( const SCH_SHEET_INSTANCE& sheet : aPastedScreen->GetSheetInstances() )
m_clipboardSheetInstances[sheet.m_Path] = sheet;
m_clipboardSymbolInstances.clear();
for( const SYMBOL_INSTANCE_REFERENCE symbol : aPastedScreen->GetSymbolInstances() )
for( const SYMBOL_INSTANCE_REFERENCE& symbol : aPastedScreen->GetSymbolInstances() )
m_clipboardSymbolInstances[symbol.m_Path] = symbol;
}