diff --git a/pcbnew/drc/drc_test_provider_copper_clearance.cpp b/pcbnew/drc/drc_test_provider_copper_clearance.cpp index 1fe3ce1d8a..b89d5b6291 100644 --- a/pcbnew/drc/drc_test_provider_copper_clearance.cpp +++ b/pcbnew/drc/drc_test_provider_copper_clearance.cpp @@ -532,7 +532,7 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::testTrackClearances() reportAux( wxT( "Testing %d tracks & vias..." ), m_board->Tracks().size() ); - std::map< std::pair, int> checkedPairs; + std::map< std::pair, LSET> checkedPairs; for( PCB_TRACK* track : m_board->Tracks() ) { @@ -565,13 +565,15 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::testTrackClearances() if( static_cast( a ) > static_cast( b ) ) std::swap( a, b ); - if( checkedPairs.count( { a, b } ) ) + auto it = checkedPairs.find( { a, b } ); + + if( it != checkedPairs.end() && it->second.test( layer ) ) { return false; } else { - checkedPairs[ { a, b } ] = 1; + checkedPairs[ { a, b } ].set( layer ); return true; } },