From 36bc44e6d71cfca13b9472bb893e6bb71b614821 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 2 Oct 2020 18:31:19 +0200 Subject: [PATCH] more cleanup about removing useless include --- common/base_screen.cpp | 1 - common/base_struct.cpp | 3 --- common/build_version.cpp | 3 ++- common/eda_dde.cpp | 6 +++--- common/eda_doc.cpp | 4 +--- common/eda_draw_frame.cpp | 1 - common/eda_size_ctrl.cpp | 3 +-- common/footprint_info.cpp | 3 --- common/fp_lib_table.cpp | 1 - common/gbr_metadata.cpp | 3 ++- common/gestfich.cpp | 7 +++---- common/grid_tricks.cpp | 2 -- common/hotkeys_basic.cpp | 15 +++++---------- common/html_messagebox.cpp | 3 --- common/lib_table_base.cpp | 3 --- common/marker_base.cpp | 2 -- common/netclass.cpp | 1 - common/pgm_base.cpp | 1 - common/prependpath.cpp | 3 +-- common/project.cpp | 3 --- common/single_top.cpp | 2 -- common/template_fieldnames.cpp | 2 -- common/textentry_tricks.cpp | 2 +- common/undo_redo_container.cpp | 1 - include/grid_tricks.h | 1 + 25 files changed, 20 insertions(+), 56 deletions(-) diff --git a/common/base_screen.cpp b/common/base_screen.cpp index 13e1dc3aaf..c7612766e9 100644 --- a/common/base_screen.cpp +++ b/common/base_screen.cpp @@ -26,7 +26,6 @@ #include #include -#include #include diff --git a/common/base_struct.cpp b/common/base_struct.cpp index 6b8bbabdd4..5751d8f0b5 100644 --- a/common/base_struct.cpp +++ b/common/base_struct.cpp @@ -28,10 +28,7 @@ #include -#include #include -#include -#include #include #include #include diff --git a/common/build_version.cpp b/common/build_version.cpp index 66c4637b9e..4a8eda1873 100644 --- a/common/build_version.cpp +++ b/common/build_version.cpp @@ -23,7 +23,8 @@ */ // Date for KiCad build version -#include +#include +#include #include // kicad_curl.h must be included before wx headers, to avoid diff --git a/common/eda_dde.cpp b/common/eda_dde.cpp index e125a01740..2a7f4bec27 100644 --- a/common/eda_dde.cpp +++ b/common/eda_dde.cpp @@ -26,12 +26,12 @@ * @file eda_dde.cpp */ -#include +//#include #include #include #include -#include -#include +//#include +//#include static const wxString HOSTNAME( wxT( "localhost" ) ); diff --git a/common/eda_doc.cpp b/common/eda_doc.cpp index fc1f55b43e..dab3edb615 100644 --- a/common/eda_doc.cpp +++ b/common/eda_doc.cpp @@ -26,9 +26,7 @@ * @file eda_doc.cpp */ -#include #include -#include #include #include #include @@ -37,7 +35,7 @@ #include #include #include -#include +#include void PGM_BASE::ReadPdfBrowserInfos() diff --git a/common/eda_draw_frame.cpp b/common/eda_draw_frame.cpp index 41fdfa28fd..9b45a54c8c 100644 --- a/common/eda_draw_frame.cpp +++ b/common/eda_draw_frame.cpp @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/common/eda_size_ctrl.cpp b/common/eda_size_ctrl.cpp index 670dea294e..37e6aa59f1 100644 --- a/common/eda_size_ctrl.cpp +++ b/common/eda_size_ctrl.cpp @@ -21,11 +21,10 @@ * or you may write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include +//#include #include #include #include -#include /********************************************************/ diff --git a/common/footprint_info.cpp b/common/footprint_info.cpp index e8d0d722d4..f16667d5a2 100644 --- a/common/footprint_info.cpp +++ b/common/footprint_info.cpp @@ -28,8 +28,6 @@ * and their documentation (comments and keywords) */ -#include -#include #include #include #include @@ -37,7 +35,6 @@ #include #include #include -#include #include #include #include diff --git a/common/fp_lib_table.cpp b/common/fp_lib_table.cpp index 7cb12fe2da..8fbd21284d 100644 --- a/common/fp_lib_table.cpp +++ b/common/fp_lib_table.cpp @@ -24,7 +24,6 @@ */ -#include #include #include #include diff --git a/common/gbr_metadata.cpp b/common/gbr_metadata.cpp index d80d7a09d8..d9f56dc6b6 100644 --- a/common/gbr_metadata.cpp +++ b/common/gbr_metadata.cpp @@ -27,8 +27,9 @@ * @brief helper functions to handle the gerber metadata in files, * related to the netlist info and aperture attribute. */ +#include +#include -#include #include #include diff --git a/common/gestfich.cpp b/common/gestfich.cpp index 35f1fee076..11f93998de 100644 --- a/common/gestfich.cpp +++ b/common/gestfich.cpp @@ -27,16 +27,15 @@ * @file gestfich.cpp * @brief Functions for file management */ - #include + #include #include #include +#include + #include #include -#include -#include - #include void AddDelimiterString( wxString& string ) diff --git a/common/grid_tricks.cpp b/common/grid_tricks.cpp index 9f0be589bc..db89da29a4 100644 --- a/common/grid_tricks.cpp +++ b/common/grid_tricks.cpp @@ -22,8 +22,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ - -#include #include #include #include diff --git a/common/hotkeys_basic.cpp b/common/hotkeys_basic.cpp index 20dc67e394..1b4e7ace16 100644 --- a/common/hotkeys_basic.cpp +++ b/common/hotkeys_basic.cpp @@ -23,16 +23,11 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include #include #include #include -#include #include -#include #include -#include -#include #include #include @@ -298,7 +293,7 @@ int KeyCodeFromKeyName( const wxString& keyname ) } -/* +/* * DisplayHotkeyList * Displays the hotkeys registered with the given tool manager. */ @@ -318,7 +313,7 @@ void ReadHotKeyConfig( wxString fileName, std::map& aHotKeys ) fn.SetPath( SETTINGS_MANAGER::GetUserSettingsPath() ); fileName = fn.GetFullPath(); } - + if( !wxFile::Exists( fileName ) ) return; @@ -356,7 +351,7 @@ int WriteHotKeyConfig( const std::map& aActionMap ) // Read the existing config (all hotkeys) // ReadHotKeyConfig( fn.GetFullPath(), hotkeys ); - + // Overlay the current app's hotkey definitions onto the map // for( const auto& ii : aActionMap ) @@ -365,7 +360,7 @@ int WriteHotKeyConfig( const std::map& aActionMap ) // Write entire hotkey set // wxFile file( fn.GetFullPath(), wxFile::OpenMode::write ); - + for( const auto& ii : hotkeys ) file.Write( wxString::Format( "%s\t%s\n", ii.first, KeyNameFromKeyCode( ii.second ) ) ); @@ -401,7 +396,7 @@ int ReadLegacyHotkeyConfigFile( const wxString& aFilename, std::map #include -#include -#include HTML_MESSAGE_BOX::HTML_MESSAGE_BOX( wxWindow* aParent, const wxString& aTitle, diff --git a/common/lib_table_base.cpp b/common/lib_table_base.cpp index 69308b1888..4e71752a01 100644 --- a/common/lib_table_base.cpp +++ b/common/lib_table_base.cpp @@ -29,12 +29,9 @@ #include -#include -#include #include #include #include -#include #include diff --git a/common/marker_base.cpp b/common/marker_base.cpp index 008f8d1473..9acdc03e62 100644 --- a/common/marker_base.cpp +++ b/common/marker_base.cpp @@ -30,9 +30,7 @@ */ -#include "fctsys.h" #include "base_screen.h" -#include "macros.h" #include "marker_base.h" #include #include diff --git a/common/netclass.cpp b/common/netclass.cpp index 344a75acec..6ce1288509 100644 --- a/common/netclass.cpp +++ b/common/netclass.cpp @@ -23,7 +23,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include #include #include diff --git a/common/pgm_base.cpp b/common/pgm_base.cpp index 81eca3791f..440d5236a5 100644 --- a/common/pgm_base.cpp +++ b/common/pgm_base.cpp @@ -30,7 +30,6 @@ * (locale handling) */ -#include #include #include #include diff --git a/common/prependpath.cpp b/common/prependpath.cpp index e0522dc036..cc2426e910 100644 --- a/common/prependpath.cpp +++ b/common/prependpath.cpp @@ -23,8 +23,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#include +#include #include diff --git a/common/project.cpp b/common/project.cpp index 54a2e0a291..976d8e3a28 100644 --- a/common/project.cpp +++ b/common/project.cpp @@ -23,15 +23,12 @@ #include -#include // NAMELESS_PROJECT #include #include -#include #include #include #include #include -#include #include #include #include diff --git a/common/single_top.cpp b/common/single_top.cpp index e1e4d7fe16..b19bac7067 100644 --- a/common/single_top.cpp +++ b/common/single_top.cpp @@ -35,8 +35,6 @@ #include -#include -#include #include #include #include diff --git a/common/template_fieldnames.cpp b/common/template_fieldnames.cpp index 0d8ed17217..9675ab56bc 100644 --- a/common/template_fieldnames.cpp +++ b/common/template_fieldnames.cpp @@ -23,8 +23,6 @@ */ #include -#include -#include #include using namespace TFIELD_T; diff --git a/common/textentry_tricks.cpp b/common/textentry_tricks.cpp index 3d089c86bb..d000c63e54 100644 --- a/common/textentry_tricks.cpp +++ b/common/textentry_tricks.cpp @@ -22,7 +22,7 @@ */ -#include +#include #include #include diff --git a/common/undo_redo_container.cpp b/common/undo_redo_container.cpp index 3940c33c75..c053674527 100644 --- a/common/undo_redo_container.cpp +++ b/common/undo_redo_container.cpp @@ -23,7 +23,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include #include #include diff --git a/include/grid_tricks.h b/include/grid_tricks.h index 11e9e83361..7dffd38941 100644 --- a/include/grid_tricks.h +++ b/include/grid_tricks.h @@ -28,6 +28,7 @@ #include #include +#include #include enum