From e907e43bd94140a1e62c8e01267c896033ba8288 Mon Sep 17 00:00:00 2001 From: Tomasz Wlostowski Date: Wed, 12 Aug 2020 00:16:20 +0200 Subject: [PATCH] pcbnew/drc: post-rebase fixes --- pcbnew/drc/drc.cpp | 3 ++- pcbnew/drc/drc_clearance_test_functions.cpp | 4 ++-- pcbnew/drc/drc_rule.h | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pcbnew/drc/drc.cpp b/pcbnew/drc/drc.cpp index 4ce931b178..b12de253c3 100644 --- a/pcbnew/drc/drc.cpp +++ b/pcbnew/drc/drc.cpp @@ -1155,7 +1155,8 @@ bool DRC::doPadToPadsDrc( BOARD_COMMIT& aCommit, D_PAD* aRefPad, D_PAD** aStart, if( aRefPad->GetDrillSize().x ) { - int minClearance = pad->GetClearance( nullptr, &m_clearanceSource ); + int minClearance = pad->GetClearance( pad->GetLayer(), nullptr, + &m_clearanceSource ); int actual; if( pad->Collide( aRefPad->GetEffectiveHoleShape(), minClearance, &actual ) ) diff --git a/pcbnew/drc/drc_clearance_test_functions.cpp b/pcbnew/drc/drc_clearance_test_functions.cpp index 9a0b6dbb4a..25371682df 100644 --- a/pcbnew/drc/drc_clearance_test_functions.cpp +++ b/pcbnew/drc/drc_clearance_test_functions.cpp @@ -232,7 +232,7 @@ void DRC::doTrackDrc( BOARD_COMMIT& aCommit, TRACK* aRefSeg, TRACKS::iterator aS { if( viaAnnulus < minAnnulus ) { - DRC_ITEM* drcItem = DRC_ITEM::Create( DRCE_VIA_ANNULUS ); + std::shared_ptr drcItem = DRC_ITEM::Create( DRCE_VIA_ANNULUS ); m_msg.Printf( _( "Via annulus too small (%s %s; actual %s)" ), m_clearanceSource, @@ -256,7 +256,7 @@ void DRC::doTrackDrc( BOARD_COMMIT& aCommit, TRACK* aRefSeg, TRACKS::iterator aS if( viaAnnulus < minAnnulus ) { - DRC_ITEM* drcItem = DRC_ITEM::Create( DRCE_VIA_ANNULUS ); + std::shared_ptr drcItem = DRC_ITEM::Create( DRCE_VIA_ANNULUS ); m_msg.Printf( _( "Via annulus too small (%s %s; actual %s)" ), m_clearanceSource, diff --git a/pcbnew/drc/drc_rule.h b/pcbnew/drc/drc_rule.h index bc820ecd6f..f39a3a496e 100644 --- a/pcbnew/drc/drc_rule.h +++ b/pcbnew/drc/drc_rule.h @@ -46,7 +46,7 @@ class PCB_EXPR_UCODE; #define DISALLOW_FOOTPRINTS (1 << 9) -enum DRC_RULE_ID_T +enum DRC_CONSTRAINT_TYPE_T { DRC_RULE_ID_UNKNOWN = -1, DRC_RULE_ID_CLEARANCE = 0, @@ -93,9 +93,10 @@ public: {} const MINOPTMAX& GetValue() const { return m_Value; } + MINOPTMAX& Value() { return m_Value; } public: - DRC_RULE_ID_T m_Type; + DRC_CONSTRAINT_TYPE_T m_Type; MINOPTMAX m_Value; int m_DisallowFlags; LSET m_LayerCondition;