Code cleanup: remove useless wx/wx.h include inside a few files.
in most of files, including wx.h is not necessary, when only 2 or 3 wx files must be included. Moreover, on windows, including wx.h sometimes create compil warnings about shadowed vars defined in some specific windows headers.
This commit is contained in:
parent
12a30c43de
commit
cffccc3970
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include "cbbox.h"
|
||||
#include <cstdio>
|
||||
#include <wx/log.h>
|
||||
#include <wx/debug.h> // For the wxASSERT
|
||||
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#define _CBBOX_H_
|
||||
|
||||
#include "../ray.h"
|
||||
#include <fctsys.h> // For the DBG(
|
||||
|
||||
/**
|
||||
* CBBOX
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <fctsys.h>
|
||||
#include <eda_base_frame.h>
|
||||
#include <project.h>
|
||||
#include <common.h>
|
||||
|
@ -39,8 +38,6 @@
|
|||
#include <boost/uuid/uuid_io.hpp>
|
||||
#include <boost/functional/hash.hpp>
|
||||
|
||||
using KIGFX::COLOR4D;
|
||||
|
||||
|
||||
// Create only once, as seeding is *very* expensive
|
||||
static boost::uuids::random_generator randomGenerator;
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include <dsnlexer.h>
|
||||
#include <macros.h>
|
||||
#include <vector>
|
||||
#include <wx/wx.h>
|
||||
#include <wx/log.h>
|
||||
#include <wx/xml/xml.h>
|
||||
#include <xnode.h>
|
||||
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
|
||||
#include <richio.h>
|
||||
|
||||
#include <wx/file.h>
|
||||
#include <wx/translation.h>
|
||||
|
||||
// Fall back to getc() when getc_unlocked() is not available on the target platform.
|
||||
#if !defined( HAVE_FGETC_NOLOCK )
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <search_stack.h>
|
||||
#include <trace_helpers.h>
|
||||
#include <wx/tokenzr.h>
|
||||
#include <wx/log.h>
|
||||
|
||||
#if defined(__MINGW32__)
|
||||
#define PATH_SEPS wxT( ";\r\n" )
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <common.h>
|
||||
#include <config.h> // to define DEFAULT_INSTALL_PATH
|
||||
#include <macros.h>
|
||||
#include <wx/log.h>
|
||||
#include <trace_helpers.h>
|
||||
|
||||
|
||||
|
|
|
@ -631,7 +631,7 @@ void mpFXY::Plot( wxDC& dc, mpWindow& w )
|
|||
if( !m_continuous )
|
||||
{
|
||||
bool first = true;
|
||||
wxCoord ix;
|
||||
wxCoord ix = 0;
|
||||
std::set<wxCoord> ys;
|
||||
|
||||
while( GetNextXY( x, y ) )
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <fctsys.h>
|
||||
#include <plotter.h>
|
||||
#include <sch_screen.h>
|
||||
#include <sch_edit_frame.h>
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include <properties.h>
|
||||
|
||||
#include <sch_io_mgr.h>
|
||||
#include <wx/translation.h>
|
||||
|
||||
#define FMT_UNIMPLEMENTED _( "Plugin \"%s\" does not implement the \"%s\" function." )
|
||||
|
||||
|
|
|
@ -35,13 +35,14 @@
|
|||
#include <vector>
|
||||
#include <functional>
|
||||
|
||||
#include <wx/wx.h>
|
||||
#include <wx/confbase.h>
|
||||
#include <wx/fileconf.h>
|
||||
#include <wx/dir.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/gdicmn.h>
|
||||
|
||||
#include <richio.h>
|
||||
#include <gal/color4d.h>
|
||||
|
||||
#include <atomic>
|
||||
#include <limits>
|
||||
|
|
|
@ -41,8 +41,7 @@
|
|||
#include <wx/aui/aui.h>
|
||||
#include <wx/docview.h>
|
||||
#include <wx/event.h>
|
||||
#include <fctsys.h>
|
||||
#include <common.h>
|
||||
|
||||
#include <layers_id_colors_and_visibility.h>
|
||||
#include <frame_type.h>
|
||||
#include <hotkeys_basic.h>
|
||||
|
|
|
@ -26,14 +26,6 @@
|
|||
#define FCTSYS_H_
|
||||
|
||||
#include <wx/wx.h>
|
||||
|
||||
#ifdef DEBUG
|
||||
#define DBG(x) x
|
||||
#else
|
||||
#define DBG(x) // nothing
|
||||
#endif
|
||||
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#endif // FCTSYS_H__
|
||||
|
|
|
@ -31,13 +31,14 @@
|
|||
#ifndef MACROS_H
|
||||
#define MACROS_H
|
||||
|
||||
#include <wx/wx.h>
|
||||
#include <deque>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <memory> // std::shared_ptr
|
||||
|
||||
#include <wx/string.h>
|
||||
|
||||
#if defined( __has_attribute )
|
||||
#define KI_HAS_ATTRIBUTE( x ) __has_attribute( x )
|
||||
#else
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
#ifndef PROPERTY_H
|
||||
#define PROPERTY_H
|
||||
|
||||
#include <wx/wx.h>
|
||||
#include <wx/any.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/propgrid/property.h>
|
||||
|
||||
#include <functional>
|
||||
|
|
|
@ -35,7 +35,8 @@
|
|||
// I really did not want to be dependent on wxWidgets in richio
|
||||
// but the errorText needs to be wide char so wxString rules.
|
||||
#include <cstdio>
|
||||
#include <wx/wx.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/stream.h>
|
||||
|
||||
#include <ki_exception.h>
|
||||
|
||||
|
|
|
@ -26,9 +26,12 @@
|
|||
#define __STATUS_POPUP_H_
|
||||
|
||||
|
||||
#include <common.h>
|
||||
#include <math/vector2d.h>
|
||||
#include <wx/popupwin.h>
|
||||
#include <wx/timer.h>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/sizer.h>
|
||||
|
||||
class EDA_DRAW_FRAME;
|
||||
|
||||
|
|
|
@ -25,8 +25,6 @@
|
|||
#define TOOL_HOLDER_H
|
||||
|
||||
#include <vector>
|
||||
#include <fctsys.h>
|
||||
#include <common.h>
|
||||
#include <tool/action_manager.h>
|
||||
#include <tool/selection.h>
|
||||
#include <tool/tool_action.h>
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#define PANEL_SETUP_BOARD_STACKUP_H
|
||||
|
||||
|
||||
#include <fctsys.h>
|
||||
#include <pcbnew.h>
|
||||
#include <class_board.h>
|
||||
#include <widgets/unit_binder.h>
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
|
||||
|
||||
#include <wx/string.h>
|
||||
#include <wx/arrstr.h>
|
||||
#include <wx/colour.h>
|
||||
#include <layers_id_colors_and_visibility.h>
|
||||
#include <i18n_utility.h> // For _HKI definition
|
||||
|
||||
|
|
|
@ -36,10 +36,9 @@
|
|||
#include <pcb_edit_frame.h>
|
||||
#include <project.h>
|
||||
#include <stdint.h>
|
||||
#include <wx/wx.h>
|
||||
//#include <wx/wx.h>
|
||||
#include <wx_html_report_panel.h>
|
||||
|
||||
#include <fctsys.h>
|
||||
#include <frame_type.h>
|
||||
#include <tool/actions.h>
|
||||
#include <tool/tool_manager.h>
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#define _DIALOG_DRC_H_
|
||||
|
||||
#include <wx/htmllbox.h>
|
||||
#include <fctsys.h>
|
||||
#include <pcbnew.h>
|
||||
#include <rc_item.h>
|
||||
#include <class_marker_pcb.h>
|
||||
|
|
|
@ -109,7 +109,8 @@ void test::DRC_TEST_PROVIDER_MATCHED_LENGTH::checkLengthViolations(
|
|||
{
|
||||
bool minViolation = false;
|
||||
bool maxViolation = false;
|
||||
int minLen, maxLen;
|
||||
int minLen = 0;
|
||||
int maxLen = 0;
|
||||
|
||||
if( aConstraint.GetValue().HasMin() && ent.total < aConstraint.GetValue().Min() )
|
||||
{
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
|
||||
#include <boost/ptr_container/ptr_vector.hpp>
|
||||
|
||||
#include <fctsys.h>
|
||||
#include <macros.h>
|
||||
#include <lib_id.h>
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#ifndef PCBNEW_H
|
||||
#define PCBNEW_H
|
||||
|
||||
#include <fctsys.h> // wxWidgets include.
|
||||
#include <convert_to_biu.h> // to define Mils2iu() conversion function
|
||||
|
||||
// These are only here for algorithmic safety, not to tell the user what to do
|
||||
|
|
|
@ -24,9 +24,10 @@
|
|||
|
||||
#include <io_mgr.h>
|
||||
#include <properties.h>
|
||||
#include <wx/translation.h>
|
||||
|
||||
|
||||
#define FMT_UNIMPLEMENTED _( "Plugin \"%s\" does not implement the \"%s\" function." )
|
||||
#define FMT_UNIMPLEMENTED "Plugin \"%s\" does not implement the \"%s\" function."
|
||||
|
||||
/**
|
||||
* Function not_implemented
|
||||
|
@ -38,8 +39,8 @@
|
|||
static void not_implemented( PLUGIN* aPlugin, const char* aCaller )
|
||||
{
|
||||
THROW_IO_ERROR( wxString::Format( FMT_UNIMPLEMENTED,
|
||||
aPlugin->PluginName().GetData(),
|
||||
wxString::FromUTF8( aCaller ).GetData() ) );
|
||||
aPlugin->PluginName(),
|
||||
wxString::FromUTF8( aCaller ) ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
// see http://www.boost.org/libs/ptr_container/doc/ptr_set.html
|
||||
#include <boost/ptr_container/ptr_set.hpp>
|
||||
|
||||
#include <fctsys.h>
|
||||
#include <specctra_import_export/specctra_lexer.h>
|
||||
#include <pcbnew.h>
|
||||
|
||||
|
|
|
@ -268,9 +268,11 @@ void UpdateCopyOfZonesList( PICKED_ITEMS_LIST& aPickList,
|
|||
if( notfound ) // happens when the new zone overlaps an existing zone
|
||||
// and these zones are combined
|
||||
{
|
||||
DBG( printf(
|
||||
#if defined(DEBUG)
|
||||
printf(
|
||||
"UpdateCopyOfZonesList(): item not found in aAuxiliaryList,"
|
||||
"combined with another zone\n" ) );
|
||||
"combined with another zone\n" );
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <wx/wx.h>
|
||||
|
||||
#include <unit_test_utils/unit_test_utils.h>
|
||||
|
||||
#include <layers_id_colors_and_visibility.h>
|
||||
|
|
Loading…
Reference in New Issue