diff --git a/3d-viewer/3d_canvas/create_3Dgraphic_brd_items.cpp b/3d-viewer/3d_canvas/create_3Dgraphic_brd_items.cpp index 32f5799711..75f400541a 100644 --- a/3d-viewer/3d_canvas/create_3Dgraphic_brd_items.cpp +++ b/3d-viewer/3d_canvas/create_3Dgraphic_brd_items.cpp @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include diff --git a/common/common.cpp b/common/common.cpp index 44b9c06f79..b7b5ba52a0 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -313,29 +313,6 @@ void SelectReferenceNumber( wxTextEntry* aTextEntry ) } -void wxStringSplit( const wxString& aText, wxArrayString& aStrings, wxChar aSplitter ) -{ - wxString tmp; - - for( unsigned ii = 0; ii < aText.Length(); ii++ ) - { - if( aText[ii] == aSplitter ) - { - aStrings.Add( tmp ); - tmp.Clear(); - } - - else - tmp << aText[ii]; - } - - if( !tmp.IsEmpty() ) - { - aStrings.Add( tmp ); - } -} - - int ProcessExecute( const wxString& aCommandLine, int aFlags, wxProcess *callback ) { return (int) wxExecute( aCommandLine, aFlags, callback ); diff --git a/common/html_messagebox.cpp b/common/html_messagebox.cpp index d6b396f933..8f30919321 100644 --- a/common/html_messagebox.cpp +++ b/common/html_messagebox.cpp @@ -24,6 +24,7 @@ #include +#include HTML_MESSAGE_BOX::HTML_MESSAGE_BOX( wxWindow* aParent, const wxString& aTitle, const wxPoint& aPosition, const wxSize& aSize ) : diff --git a/common/string.cpp b/common/string.cpp index 481013b94d..bb5c6e1feb 100644 --- a/common/string.cpp +++ b/common/string.cpp @@ -790,3 +790,26 @@ bool ReplaceIllegalFileNameChars( wxString& aName, int aReplaceChar ) return changed; } + + +void wxStringSplit( const wxString& aText, wxArrayString& aStrings, wxChar aSplitter ) +{ + wxString tmp; + + for( unsigned ii = 0; ii < aText.Length(); ii++ ) + { + if( aText[ii] == aSplitter ) + { + aStrings.Add( tmp ); + tmp.Clear(); + } + + else + tmp << aText[ii]; + } + + if( !tmp.IsEmpty() ) + { + aStrings.Add( tmp ); + } +} \ No newline at end of file diff --git a/eeschema/sch_text.cpp b/eeschema/sch_text.cpp index 49ff4395f8..25a41cdc37 100644 --- a/eeschema/sch_text.cpp +++ b/eeschema/sch_text.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index 935efadced..255aa000d4 100644 --- a/include/common.h +++ b/include/common.h @@ -253,15 +253,6 @@ void SelectReferenceNumber( wxTextEntry* aTextEntry ); int ProcessExecute( const wxString& aCommandLine, int aFlags = wxEXEC_ASYNC, wxProcess *callback = NULL ); -/** - * Split \a aString to a string list separated at \a aSplitter. - * - * @param aText is the text to split - * @param aStrings will contain the splitted lines - * @param aSplitter is the 'split' character - */ -void wxStringSplit( const wxString& aText, wxArrayString& aStrings, wxChar aSplitter ); - /** * Return the help file's full path. *

diff --git a/include/kicad_string.h b/include/kicad_string.h index 2672819fd3..fc5437a7cb 100644 --- a/include/kicad_string.h +++ b/include/kicad_string.h @@ -301,4 +301,14 @@ inline void AccumulateDescription( wxString& aDesc, const wxString& aItem ) } +/** + * Split \a aString to a string list separated at \a aSplitter. + * + * @param aText is the text to split + * @param aStrings will contain the splitted lines + * @param aSplitter is the 'split' character + */ +void wxStringSplit( const wxString& aText, wxArrayString& aStrings, wxChar aSplitter ); + + #endif // KICAD_STRING_H_ diff --git a/pcbnew/board_items_to_polygon_shape_transform.cpp b/pcbnew/board_items_to_polygon_shape_transform.cpp index 6212c7467a..6101fec6a3 100644 --- a/pcbnew/board_items_to_polygon_shape_transform.cpp +++ b/pcbnew/board_items_to_polygon_shape_transform.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/dialogs/dialog_footprint_wizard_list.cpp b/pcbnew/dialogs/dialog_footprint_wizard_list.cpp index 7ef7dd69b5..6ce24ba256 100644 --- a/pcbnew/dialogs/dialog_footprint_wizard_list.cpp +++ b/pcbnew/dialogs/dialog_footprint_wizard_list.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include diff --git a/pcbnew/plot_brditems_plotter.cpp b/pcbnew/plot_brditems_plotter.cpp index fa94a2677d..80f889b607 100644 --- a/pcbnew/plot_brditems_plotter.cpp +++ b/pcbnew/plot_brditems_plotter.cpp @@ -28,13 +28,13 @@ #include // for vector, __vector_base<>... #include -#include #include #include // for SEG #include #include // for SHAPE_LINE_CHAIN #include // for SHAPE_POLY_SET, SHAPE_P... #include +#include #include // for KiROUND, Clamp #include // for VECTOR2I #include