Browse Source

Fix compile errors in drc_engine.cpp and panel_setup_rules.cpp

pull/16/head
Qbort 5 years ago
committed by Ian McInerney
parent
commit
9977299340
  1. 6
      pcbnew/dialogs/panel_setup_rules.cpp
  2. 7
      qa/drc_proto/drc_engine.cpp

6
pcbnew/dialogs/panel_setup_rules.cpp

@ -253,14 +253,14 @@ void PANEL_SETUP_RULES::OnErrorLinkClicked( wxHtmlLinkEvent& event )
{
wxString link = event.GetLinkInfo().GetHref();
wxArrayString parts;
int line = 0, offset = 0;
long line = 0, offset = 0;
wxStringSplit( link, parts, ':' );
if( parts.size() > 1 )
{
line = (int) strtol( parts[0], nullptr, 10 );
offset = (int) strtol( parts[1], nullptr, 10 );
parts[0].ToLong( &line );
parts[1].ToLong( &offset );
}
int pos = m_textEditor->PositionFromLine( line - 1 ) + ( offset - 1 );

7
qa/drc_proto/drc_engine.cpp

@ -242,12 +242,15 @@ test::DRC_RULE* test::DRC_ENGINE::EvalRulesForItems( test::DRC_RULE_ID_T ruleID,
{
for( auto condition : rcond->conditions )
{
drc_dbg(8, " -> check condition '%s'\n", (const char*) condition->m_Expression );
drc_dbg( 8, " -> check condition '%s'\n",
(const char*) condition->m_Expression.c_str() );
bool result = condition->EvaluateFor( a, b );
if( result )
{
drc_dbg(8, " -> rule '%s' matches, triggered by condition '%s'\n", (const char*) rcond->rule->m_Name.c_str(), (const char*) condition->m_Expression );
drc_dbg( 8, " -> rule '%s' matches, triggered by condition '%s'\n",
(const char*) rcond->rule->m_Name.c_str(),
(const char*) condition->m_Expression.c_str() );
return rcond->rule;
}
}

Loading…
Cancel
Save