From 661539754184f6eff98568acf6737fde5d2daf09 Mon Sep 17 00:00:00 2001 From: Tomasz Wlostowski Date: Fri, 24 Jul 2020 16:19:26 +0200 Subject: [PATCH] drc_proto: DRC_RULE now uses new libeval API --- qa/drc_proto/drc_rule.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qa/drc_proto/drc_rule.cpp b/qa/drc_proto/drc_rule.cpp index 75a4b2ccae..7981c918c2 100644 --- a/qa/drc_proto/drc_rule.cpp +++ b/qa/drc_proto/drc_rule.cpp @@ -57,11 +57,11 @@ bool test::DRC_RULE_CONDITION::EvaluateFor( const BOARD_ITEM* aItemA, const BOAR { BOARD_ITEM* a = const_cast( aItemA ); BOARD_ITEM* b = aItemB ? const_cast( aItemB ) : DELETED_BOARD_ITEM::GetInstance(); + LIBEVAL::CONTEXT ctx; + m_ucode->SetItems( a, b ); + ctx.Run( m_ucode ); - PCB_EXPR_CONTEXT ctx; - ctx.SetItems( a, b ); - - return m_ucode->Run( &ctx )->AsDouble() != 0.0; + return ctx.GetResult()->AsDouble() != 0.0; }