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 ) )
|
if( other == pad || pad->SameLogicalPadAs( other ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// store canonical order so we don't collide in both directions
|
// store canonical order so we don't collide in both directions (a:b and b:a)
|
||||||
// (a:b and b:a)
|
PAD* a = pad;
|
||||||
if( static_cast<void*>( pad ) > static_cast<void*>( other ) )
|
PAD* b = other;
|
||||||
std::swap( pad, 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;
|
continue;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
checkedPairs[ { pad, other } ] = 1;
|
checkedPairs[ { a, b } ] = 1;
|
||||||
}
|
|
||||||
|
|
||||||
VECTOR2I pos;
|
VECTOR2I pos;
|
||||||
SHAPE* padShape = pad->GetEffectiveShape().get();
|
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 )
|
void FOOTPRINT::SwapData( BOARD_ITEM* aImage )
|
||||||
|
|
Loading…
Reference in New Issue