From c5c6b97c8ba650df6f070672f1fcb2a3622e3e98 Mon Sep 17 00:00:00 2001 From: Tomasz Wlostowski Date: Sun, 27 Sep 2020 17:51:16 +0200 Subject: [PATCH] drc: fixed warnings in length matcher --- pcbnew/drc/drc_test_provider_matched_length.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pcbnew/drc/drc_test_provider_matched_length.cpp b/pcbnew/drc/drc_test_provider_matched_length.cpp index 194e45a52a..fb5fcb8245 100644 --- a/pcbnew/drc/drc_test_provider_matched_length.cpp +++ b/pcbnew/drc/drc_test_provider_matched_length.cpp @@ -144,7 +144,7 @@ void test::DRC_TEST_PROVIDER_MATCHED_LENGTH::checkLengthViolations( drcItem->SetErrorMessage( msg ); for( auto offendingTrack : ent.items ) - drcItem->SetItems( offendingTrack ); + drcItem->AddItem( offendingTrack ); drcItem->SetViolatingRule( aConstraint.GetParentRule() ); @@ -250,7 +250,7 @@ bool test::DRC_TEST_PROVIDER_MATCHED_LENGTH::runInternal( bool aDelayReportMode for( int i = 0; i < 3; i++ ) { - auto constraint = m_drcEngine->EvalRulesForItems( constraintsToCheck[i], item ); + auto constraint = m_drcEngine->EvalRulesForItems( constraintsToCheck[i], item, nullptr, item->GetLayer() ); if( constraint.IsNull() ) continue; @@ -296,18 +296,18 @@ bool test::DRC_TEST_PROVIDER_MATCHED_LENGTH::runInternal( bool aDelayReportMode for( auto citem : nitem.second ) { - if ( auto bi = dyn_cast( citem ) ) + if ( auto via = dyn_cast( citem ) ) { ent.viaCount++; - ent.totalVia += computeViaThruLength( bi, nitem.second ); // fixme: via thru distance + ent.totalVia += computeViaThruLength( via, nitem.second ); // fixme: via thru distance } - else if ( auto bi = dyn_cast(citem )) + else if ( auto trk = dyn_cast(citem )) { - ent.totalRoute += bi->GetLength(); + ent.totalRoute += trk->GetLength(); } - else if ( auto bi = dyn_cast( citem )) + else if ( auto pad = dyn_cast( citem )) { - ent.totalPadToDie += bi->GetPadToDieLength(); + ent.totalPadToDie += pad->GetPadToDieLength(); } }