Meet irreflexive requirements of std::sort

Fixes https://gitlab.com/kicad/code/kicad/issues/6053
This commit is contained in:
Jeff Young 2020-10-18 21:02:21 +01:00
parent d7ea70ba02
commit 16d5f95981
1 changed files with 4 additions and 0 deletions

View File

@ -142,6 +142,10 @@ bool CONNECTION_SUBGRAPH::ResolveDrivers( bool aCreateMarkers )
std::sort( candidates.begin(), candidates.end(),
[&]( SCH_ITEM* a, SCH_ITEM* b ) -> bool
{
// meet irreflexive requirements of std::sort
if( a == b )
return false;
SCH_CONNECTION* ac = a->Connection( &m_sheet );
SCH_CONNECTION* bc = b->Connection( &m_sheet );