From 9faccda68d4959c7b13972050b4b91ff9b1bd2d3 Mon Sep 17 00:00:00 2001 From: Roberto Fernandez Bautista Date: Wed, 7 Oct 2020 18:32:07 +0100 Subject: [PATCH] Fix compile errors in MSVC --- qa/drc_proto/drc_proto.cpp | 2 +- qa/qa_utils/mocks.cpp | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/qa/drc_proto/drc_proto.cpp b/qa/drc_proto/drc_proto.cpp index 603034f23d..c3c1faec4a 100644 --- a/qa/drc_proto/drc_proto.cpp +++ b/qa/drc_proto/drc_proto.cpp @@ -81,7 +81,7 @@ PROJECT_CONTEXT loadKicadProject( wxString filename, OPT rulesFilePath manager.LoadProject( pro.GetFullPath() ); rv.project = &manager.Prj(); - rv.board.reset( KI_TEST::ReadBoardFromFileOrStream( (const char *) brdName.GetFullPath() ).release() ); + rv.board.reset( KI_TEST::ReadBoardFromFileOrStream( std::string( brdName.GetFullPath().ToUTF8() ) ).release() ); rv.board->SetProject( rv.project ); if( rulesFilePath ) diff --git a/qa/qa_utils/mocks.cpp b/qa/qa_utils/mocks.cpp index abe0306369..1049923c86 100644 --- a/qa/qa_utils/mocks.cpp +++ b/qa/qa_utils/mocks.cpp @@ -538,7 +538,7 @@ PCBNEW_SELECTION& SELECTION_TOOL::RequestSelection( CLIENT_SELECTION_FILTER aCli const GENERAL_COLLECTORS_GUIDE SELECTION_TOOL::getCollectorsGuide() const { - + return GENERAL_COLLECTORS_GUIDE( LSET(), PCB_LAYER_ID::UNDEFINED_LAYER, nullptr ); } @@ -881,7 +881,9 @@ void PCB_TOOL_BASE::setTransitions() const PCB_DISPLAY_OPTIONS& PCB_TOOL_BASE::displayOptions() const { - + static PCB_DISPLAY_OPTIONS disp; + + return disp; } PCB_DRAW_PANEL_GAL* PCB_TOOL_BASE::canvas() const @@ -892,11 +894,17 @@ PCB_DRAW_PANEL_GAL* PCB_TOOL_BASE::canvas() const const PCBNEW_SELECTION& PCB_TOOL_BASE::selection() const { + static PCBNEW_SELECTION sel; + + return sel; } PCBNEW_SELECTION& PCB_TOOL_BASE::selection() { + static PCBNEW_SELECTION sel; + + return sel; }