Don't modify outer loop variable inside inner loop.
This commit is contained in:
parent
476f1a7d4d
commit
73f835437e
|
@ -2274,19 +2274,20 @@ void FOOTPRINT::CheckOverlappingPads( const std::function<void( const PAD*, cons
|
|||
if( other == pad || pad->SameLogicalPadAs( other ) )
|
||||
continue;
|
||||
|
||||
// store canonical order so we don't collide in both directions
|
||||
// (a:b and b:a)
|
||||
if( static_cast<void*>( pad ) > static_cast<void*>( other ) )
|
||||
std::swap( pad, other );
|
||||
// store canonical order so we don't collide in both directions (a:b and b:a)
|
||||
PAD* a = pad;
|
||||
PAD* b = other;
|
||||
|
||||
if( checkedPairs.count( { pad, other } ) )
|
||||
if( static_cast<void*>( a ) > static_cast<void*>( b ) )
|
||||
std::swap( a, b );
|
||||
|
||||
if( checkedPairs.count( { a, b } ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
checkedPairs[ { pad, other } ] = 1;
|
||||
}
|
||||
checkedPairs[ { a, b } ] = 1;
|
||||
|
||||
VECTOR2I pos;
|
||||
SHAPE* padShape = pad->GetEffectiveShape().get();
|
||||
|
@ -2299,6 +2300,7 @@ void FOOTPRINT::CheckOverlappingPads( const std::function<void( const PAD*, cons
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void FOOTPRINT::SwapData( BOARD_ITEM* aImage )
|
||||
|
|
Loading…
Reference in New Issue