Fix compile errors in drc_engine.cpp and panel_setup_rules.cpp

This commit is contained in:
Qbort 2020-07-31 18:37:24 +01:00 committed by Ian McInerney
parent edba020f44
commit 9977299340
2 changed files with 8 additions and 5 deletions

View File

@ -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 );

View File

@ -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;
}
}