Fix a few accidental copies in loop iterators

This commit is contained in:
Ian McInerney 2023-06-15 22:57:05 +01:00
parent 150e2b8a19
commit b73cc7db4a
3 changed files with 8 additions and 8 deletions

View File

@ -704,14 +704,14 @@ void CONNECTION_GRAPH::removeSubgraphs( std::set<CONNECTION_SUBGRAPH*>& aSubgrap
std::sort( m_subgraphs.begin(), m_subgraphs.end() ); std::sort( m_subgraphs.begin(), m_subgraphs.end() );
std::set<int> codes_to_remove; std::set<int> codes_to_remove;
for( auto el : m_sheet_to_subgraphs_map ) for( auto& el : m_sheet_to_subgraphs_map )
{ {
std::sort( el.second.begin(), el.second.end() ); std::sort( el.second.begin(), el.second.end() );
} }
for( CONNECTION_SUBGRAPH* sg : aSubgraphs ) for( CONNECTION_SUBGRAPH* sg : aSubgraphs )
{ {
for( auto it : sg->m_bus_neighbors ) for( auto& it : sg->m_bus_neighbors )
{ {
for( CONNECTION_SUBGRAPH* neighbor : it.second ) for( CONNECTION_SUBGRAPH* neighbor : it.second )
{ {
@ -730,7 +730,7 @@ void CONNECTION_GRAPH::removeSubgraphs( std::set<CONNECTION_SUBGRAPH*>& aSubgrap
} }
} }
for( auto it : sg->m_bus_parents ) for( auto& it : sg->m_bus_parents )
{ {
for( CONNECTION_SUBGRAPH* parent : it.second ) for( CONNECTION_SUBGRAPH* parent : it.second )
{ {

View File

@ -2177,7 +2177,7 @@ void ALTIUM_PCB::ConvertArcs6ToBoardItem( const AARC6& aElem, const int aPrimiti
ConvertArcs6ToBoardItemOnLayer( aElem, klayer ); ConvertArcs6ToBoardItemOnLayer( aElem, klayer );
} }
for( const auto layerExpansionMask : for( const auto& layerExpansionMask :
HelperGetSolderAndPasteMaskExpansions( ALTIUM_RECORD::ARC, aPrimitiveIndex, aElem.layer ) ) HelperGetSolderAndPasteMaskExpansions( ALTIUM_RECORD::ARC, aPrimitiveIndex, aElem.layer ) )
{ {
int width = aElem.width + ( layerExpansionMask.second * 2 ); int width = aElem.width + ( layerExpansionMask.second * 2 );
@ -2230,7 +2230,7 @@ void ALTIUM_PCB::ConvertArcs6ToFootprintItem( FOOTPRINT* aFootprint, const AARC6
} }
} }
for( const auto layerExpansionMask : for( const auto& layerExpansionMask :
HelperGetSolderAndPasteMaskExpansions( ALTIUM_RECORD::ARC, aPrimitiveIndex, aElem.layer ) ) HelperGetSolderAndPasteMaskExpansions( ALTIUM_RECORD::ARC, aPrimitiveIndex, aElem.layer ) )
{ {
int width = aElem.width + ( layerExpansionMask.second * 2 ); int width = aElem.width + ( layerExpansionMask.second * 2 );
@ -2873,7 +2873,7 @@ void ALTIUM_PCB::ConvertTracks6ToBoardItem( const ATRACK6& aElem, const int aPri
} }
} }
for( const auto layerExpansionMask : HelperGetSolderAndPasteMaskExpansions( for( const auto& layerExpansionMask : HelperGetSolderAndPasteMaskExpansions(
ALTIUM_RECORD::TRACK, aPrimitiveIndex, aElem.layer ) ) ALTIUM_RECORD::TRACK, aPrimitiveIndex, aElem.layer ) )
{ {
int width = aElem.width + ( layerExpansionMask.second * 2 ); int width = aElem.width + ( layerExpansionMask.second * 2 );
@ -2927,7 +2927,7 @@ void ALTIUM_PCB::ConvertTracks6ToFootprintItem( FOOTPRINT* aFootprint, const ATR
} }
} }
for( const auto layerExpansionMask : HelperGetSolderAndPasteMaskExpansions( for( const auto& layerExpansionMask : HelperGetSolderAndPasteMaskExpansions(
ALTIUM_RECORD::TRACK, aPrimitiveIndex, aElem.layer ) ) ALTIUM_RECORD::TRACK, aPrimitiveIndex, aElem.layer ) )
{ {
int width = aElem.width + ( layerExpansionMask.second * 2 ); int width = aElem.width + ( layerExpansionMask.second * 2 );

View File

@ -178,7 +178,7 @@ SHOVE::~SHOVE()
{ {
std::unordered_set<LINE*> alreadyDeleted; std::unordered_set<LINE*> alreadyDeleted;
for( auto it : m_rootLineHistory ) for( auto& it : m_rootLineHistory )
{ {
auto it2 = alreadyDeleted.find( it.second ); auto it2 = alreadyDeleted.find( it.second );