Formatting.

This commit is contained in:
Jeff Young 2022-10-06 20:30:34 +01:00
parent 0fea6f5ac3
commit d6c7f46842
1 changed files with 16 additions and 14 deletions

View File

@ -272,8 +272,6 @@ bool test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run()
{ {
m_board = m_drcEngine->GetBoard(); m_board = m_drcEngine->GetBoard();
std::map<DIFF_PAIR_KEY, DIFF_PAIR_ITEMS> dpRuleMatches; std::map<DIFF_PAIR_KEY, DIFF_PAIR_ITEMS> dpRuleMatches;
auto evaluateDpConstraints = auto evaluateDpConstraints =
@ -294,8 +292,9 @@ bool test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run()
for( int i = 0; i < 2; i++ ) for( int i = 0; i < 2; i++ )
{ {
auto constraint = m_drcEngine->EvalRules( constraintsToCheck[ i ], item, DRC_CONSTRAINT constraint = m_drcEngine->EvalRules( constraintsToCheck[ i ],
nullptr, item->GetLayer() ); item, nullptr,
item->GetLayer() );
if( constraint.IsNull() || constraint.GetSeverity() == RPT_SEVERITY_IGNORE ) if( constraint.IsNull() || constraint.GetSeverity() == RPT_SEVERITY_IGNORE )
continue; continue;
@ -321,7 +320,6 @@ bool test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run()
drc_dbg( 10, wxT( "dp rule matches %d\n" ), (int) dpRuleMatches.size() ); drc_dbg( 10, wxT( "dp rule matches %d\n" ), (int) dpRuleMatches.size() );
reportAux( wxT( "DPs evaluated:" ) ); reportAux( wxT( "DPs evaluated:" ) );
for( auto& [ key, itemSet ] : dpRuleMatches ) for( auto& [ key, itemSet ] : dpRuleMatches )
@ -378,7 +376,7 @@ bool test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run()
dp.computedGap = gap; dp.computedGap = gap;
auto overlay = m_drcEngine->GetDebugOverlay(); std::shared_ptr<KIGFX::VIEW_OVERLAY> overlay = m_drcEngine->GetDebugOverlay();
if( overlay ) if( overlay )
{ {
@ -398,7 +396,7 @@ bool test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run()
if( gapConstraint ) if( gapConstraint )
{ {
auto val = gapConstraint->GetValue(); const MINOPTMAX<int>& val = gapConstraint->GetValue();
bool insideRange = true; bool insideRange = true;
if( val.HasMin() && gap < val.Min() ) if( val.HasMin() && gap < val.Min() )
@ -489,12 +487,16 @@ bool test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run()
gapConstraint->GetParentRule()->m_Name + wxS( " " ); gapConstraint->GetParentRule()->m_Name + wxS( " " );
if( val.HasMin() ) if( val.HasMin() )
{
msg += wxString::Format( _( "minimum gap: %s; " ), msg += wxString::Format( _( "minimum gap: %s; " ),
MessageTextFromValue( val.Min() ) ); MessageTextFromValue( val.Min() ) );
}
if( val.HasMax() ) if( val.HasMax() )
{
msg += wxString::Format( _( "maximum gap: %s; " ), msg += wxString::Format( _( "maximum gap: %s; " ),
MessageTextFromValue( val.Max() ) ); MessageTextFromValue( val.Max() ) );
}
msg += wxString::Format( _( "actual: %s)" ), msg += wxString::Format( _( "actual: %s)" ),
MessageTextFromValue( dp.computedGap ) ); MessageTextFromValue( dp.computedGap ) );