From 9977299340acfcd2a091303325461c719e4f12cf Mon Sep 17 00:00:00 2001 From: Qbort <6035515-Qbort@users.noreply.gitlab.com> Date: Fri, 31 Jul 2020 18:37:24 +0100 Subject: [PATCH] Fix compile errors in drc_engine.cpp and panel_setup_rules.cpp --- pcbnew/dialogs/panel_setup_rules.cpp | 6 +++--- qa/drc_proto/drc_engine.cpp | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pcbnew/dialogs/panel_setup_rules.cpp b/pcbnew/dialogs/panel_setup_rules.cpp index c5ed624ef1..20f5e106d8 100644 --- a/pcbnew/dialogs/panel_setup_rules.cpp +++ b/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 ); diff --git a/qa/drc_proto/drc_engine.cpp b/qa/drc_proto/drc_engine.cpp index 4391db88a1..51a83b3a0f 100644 --- a/qa/drc_proto/drc_engine.cpp +++ b/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; } }