From 413a3d828a5b0c098790f9d956b0d6b3128146fb Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 24 May 2017 18:08:15 +0200 Subject: [PATCH] remove dead code in swig --- pcbnew/swig/pcbnew_scripting_helpers.cpp | 24 +----------------------- pcbnew/swig/pcbnew_scripting_helpers.h | 5 +++-- 2 files changed, 4 insertions(+), 25 deletions(-) diff --git a/pcbnew/swig/pcbnew_scripting_helpers.cpp b/pcbnew/swig/pcbnew_scripting_helpers.cpp index 12ed46fdc7..d66f05cd19 100644 --- a/pcbnew/swig/pcbnew_scripting_helpers.cpp +++ b/pcbnew/swig/pcbnew_scripting_helpers.cpp @@ -77,35 +77,13 @@ BOARD* LoadBoard( wxString& aFileName, IO_MGR::PCB_FILE_T aFormat ) bool SaveBoard( wxString& aFilename, BOARD* aBoard ) -{ - return SaveBoard( aFilename, aBoard, IO_MGR::KICAD ); -} - - -bool SaveBoard( wxString& aFileName, BOARD* aBoard, - IO_MGR::PCB_FILE_T aFormat ) { aBoard->m_Status_Pcb &= ~CONNEXION_OK; aBoard->SynchronizeNetsAndNetClasses(); aBoard->GetDesignSettings().SetCurrentNetClass( NETCLASS::Default ); -#if 0 - wxString header; - PROPERTIES props; + IO_MGR::Save( IO_MGR::KICAD, aFileName, aBoard, NULL ); - if( aFormat == IO_MGR::LEGACY ) - { - header = wxString::Format( - wxT( "PCBNEW-BOARD Version %d date %s\n\n# Created by Pcbnew%s scripting\n\n" ), - LEGACY_BOARD_FILE_VERSION, DateAndTime().GetData(), - GetBuildVersion().GetData() ); - props["header"] = header; - } - - IO_MGR::Save( aFormat, aFileName, aBoard, &props ); -#else - IO_MGR::Save( aFormat, aFileName, aBoard, NULL ); -#endif return true; } diff --git a/pcbnew/swig/pcbnew_scripting_helpers.h b/pcbnew/swig/pcbnew_scripting_helpers.h index d5e31a067b..d269c5a620 100644 --- a/pcbnew/swig/pcbnew_scripting_helpers.h +++ b/pcbnew/swig/pcbnew_scripting_helpers.h @@ -27,8 +27,10 @@ #include #include + /* we could be including all these methods as static in a class, but - * we want plain pcbnew. access from python */ + * we want plain pcbnew. access from python + */ #ifndef SWIG void ScriptingSetPcbEditFrame( PCB_EDIT_FRAME* aPCBEdaFrame ); @@ -40,7 +42,6 @@ BOARD* GetBoard(); BOARD* LoadBoard( wxString& aFileName, IO_MGR::PCB_FILE_T aFormat ); BOARD* LoadBoard( wxString& aFileName ); -bool SaveBoard( wxString& aFileName, BOARD* aBoard, IO_MGR::PCB_FILE_T aFormat ); bool SaveBoard( wxString& aFileName, BOARD* aBoard ); void Refresh();