drc_proto: DRC_RULE now uses new libeval API

This commit is contained in:
Tomasz Wlostowski 2020-07-24 16:19:26 +02:00
parent b982ef6a48
commit 6615397541
1 changed files with 4 additions and 4 deletions

View File

@ -57,11 +57,11 @@ bool test::DRC_RULE_CONDITION::EvaluateFor( const BOARD_ITEM* aItemA, const BOAR
{
BOARD_ITEM* a = const_cast<BOARD_ITEM*>( aItemA );
BOARD_ITEM* b = aItemB ? const_cast<BOARD_ITEM*>( 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;
}