diff --git a/common/dialogs/dialog_page_settings.cpp b/common/dialogs/dialog_page_settings.cpp
index 353f478752..5e2761d003 100644
--- a/common/dialogs/dialog_page_settings.cpp
+++ b/common/dialogs/dialog_page_settings.cpp
@@ -517,8 +517,7 @@ bool DIALOG_PAGES_SETTINGS::SavePageSettings()
if( !fullFileName.IsEmpty() && !wxFileExists( fullFileName ) )
{
wxString msg;
- msg.Printf( _( "Page layout description file \"%s\" not found." ),
- GetChars( fullFileName ) );
+ msg.Printf( _( "Page layout description file \"%s\" not found." ), fullFileName );
wxMessageBox( msg );
return false;
}
@@ -902,7 +901,7 @@ void DIALOG_PAGES_SETTINGS::OnWksFileSelection( wxCommandEvent& event )
"Do you want to use the relative path:\n"
"\"%s\"\n"
"instead of\n"
- "\"%s\"?" ), GetChars( shortFileName ), GetChars( fileName ) );
+ "\"%s\"?" ), shortFileName, fileName );
if( !IsOK( this, msg ) )
shortFileName = fileName;
diff --git a/common/dsnlexer.cpp b/common/dsnlexer.cpp
index 6bdb2e6ee5..7934f8e91a 100644
--- a/common/dsnlexer.cpp
+++ b/common/dsnlexer.cpp
@@ -321,7 +321,7 @@ bool DSNLEXER::IsSymbol( int aTok )
void DSNLEXER::Expecting( int aTok )
{
wxString errText = wxString::Format(
- _( "Expecting %s" ), GetChars( GetTokenString( aTok ) ) );
+ _( "Expecting %s" ), GetTokenString( aTok ) );
THROW_PARSE_ERROR( errText, CurSource(), CurLine(), CurLineNumber(), CurOffset() );
}
@@ -329,7 +329,7 @@ void DSNLEXER::Expecting( int aTok )
void DSNLEXER::Expecting( const char* text )
{
wxString errText = wxString::Format(
- _( "Expecting '%s'" ), GetChars( wxString::FromUTF8( text ) ) );
+ _( "Expecting '%s'" ), wxString::FromUTF8( text ) );
THROW_PARSE_ERROR( errText, CurSource(), CurLine(), CurLineNumber(), CurOffset() );
}
@@ -337,7 +337,7 @@ void DSNLEXER::Expecting( const char* text )
void DSNLEXER::Unexpected( int aTok )
{
wxString errText = wxString::Format(
- _( "Unexpected %s" ), GetChars( GetTokenString( aTok ) ) );
+ _( "Unexpected %s" ), GetTokenString( aTok ) );
THROW_PARSE_ERROR( errText, CurSource(), CurLine(), CurLineNumber(), CurOffset() );
}
@@ -353,7 +353,7 @@ void DSNLEXER::Duplicate( int aTok )
void DSNLEXER::Unexpected( const char* text )
{
wxString errText = wxString::Format(
- _( "Unexpected '%s'" ), GetChars( wxString::FromUTF8( text ) ) );
+ _( "Unexpected '%s'" ), wxString::FromUTF8( text ) );
THROW_PARSE_ERROR( errText, CurSource(), CurLine(), CurLineNumber(), CurOffset() );
}
diff --git a/common/eda_base_frame.cpp b/common/eda_base_frame.cpp
index b8bdfeb559..4531fe6634 100644
--- a/common/eda_base_frame.cpp
+++ b/common/eda_base_frame.cpp
@@ -820,17 +820,17 @@ bool EDA_BASE_FRAME::IsWritable( const wxFileName& aFileName )
if( fn.IsDir() && !fn.IsDirWritable() )
{
msg.Printf( _( "You do not have write permissions to folder \"%s\"." ),
- GetChars( fn.GetPath() ) );
+ fn.GetPath() );
}
else if( !fn.FileExists() && !fn.IsDirWritable() )
{
msg.Printf( _( "You do not have write permissions to save file \"%s\" to folder \"%s\"." ),
- GetChars( fn.GetFullName() ), GetChars( fn.GetPath() ) );
+ fn.GetFullName(), fn.GetPath() );
}
else if( fn.FileExists() && !fn.IsFileWritable() )
{
msg.Printf( _( "You do not have write permissions to save file \"%s\"." ),
- GetChars( fn.GetFullPath() ) );
+ fn.GetFullPath() );
}
if( !msg.IsEmpty() )
@@ -863,7 +863,7 @@ void EDA_BASE_FRAME::CheckForAutoSaveFile( const wxFileName& aFileName )
"It appears that the last time you were editing the file\n"
"\"%s\"\n"
"it was not saved properly. Do you wish to restore the last saved edits you made?" ),
- GetChars( aFileName.GetFullName() )
+ aFileName.GetFullName()
);
int response = wxMessageBox( msg, Pgm().App().GetAppName(), wxYES_NO | wxICON_QUESTION, this );
diff --git a/common/eda_doc.cpp b/common/eda_doc.cpp
index dab3edb615..aeca824911 100644
--- a/common/eda_doc.cpp
+++ b/common/eda_doc.cpp
@@ -153,7 +153,7 @@ bool GetAssociatedDocument( wxWindow* aParent, const wxString& aDocName, PROJECT
if( !wxFileExists( fullfilename ) )
{
- msg.Printf( _( "Doc File \"%s\" not found" ), GetChars( docname ) );
+ msg.Printf( _( "Doc File \"%s\" not found" ), docname );
DisplayError( aParent, msg );
return false;
}
@@ -196,7 +196,7 @@ bool GetAssociatedDocument( wxWindow* aParent, const wxString& aDocName, PROJECT
if( !success )
{
- msg.Printf( _( "Unknown MIME type for doc file \"%s\"" ), GetChars( fullfilename ) );
+ msg.Printf( _( "Unknown MIME type for doc file \"%s\"" ), fullfilename );
DisplayError( aParent, msg );
}
diff --git a/common/eda_item.cpp b/common/eda_item.cpp
index 3d09021083..1b49c9cb3b 100644
--- a/common/eda_item.cpp
+++ b/common/eda_item.cpp
@@ -180,8 +180,7 @@ bool EDA_ITEM::Replace( wxFindReplaceData& aSearchData, wxString& aText )
suffix = aText.Right( aText.length() - ( aSearchData.GetFindString().length() + result ) );
wxLogTrace( traceFindReplace, wxT( "Replacing '%s', prefix '%s', replace '%s', suffix '%s'." ),
- GetChars( aText ), GetChars( prefix ), GetChars( aSearchData.GetReplaceString() ),
- GetChars( suffix ) );
+ aText, prefix, aSearchData.GetReplaceString(), suffix );
aText = prefix + aSearchData.GetReplaceString() + suffix;
@@ -192,7 +191,7 @@ bool EDA_ITEM::Replace( wxFindReplaceData& aSearchData, wxString& aText )
bool EDA_ITEM::operator<( const EDA_ITEM& aItem ) const
{
wxFAIL_MSG( wxString::Format( wxT( "Less than operator not defined for item type %s." ),
- GetChars( GetClass() ) ) );
+ GetClass() ) );
return false;
}
diff --git a/common/gestfich.cpp b/common/gestfich.cpp
index d1b7cd02d1..a3a9f7730f 100644
--- a/common/gestfich.cpp
+++ b/common/gestfich.cpp
@@ -184,7 +184,7 @@ int ExecuteFile( wxWindow* frame, const wxString& ExecFile, const wxString& para
#endif
wxString msg;
- msg.Printf( _( "Command \"%s\" could not found" ), GetChars( fullFileName ) );
+ msg.Printf( _( "Command \"%s\" could not found" ), fullFileName );
DisplayError( frame, msg, 20 );
return -1;
}
diff --git a/common/html_messagebox.cpp b/common/html_messagebox.cpp
index 521a045889..d6b396f933 100644
--- a/common/html_messagebox.cpp
+++ b/common/html_messagebox.cpp
@@ -107,7 +107,7 @@ void HTML_MESSAGE_BOX::ListSet( const wxArrayString& aList )
void HTML_MESSAGE_BOX::MessageSet( const wxString& message )
{
wxString message_value = wxString::Format(
- wxT( "%s
" ), GetChars( message ) );
+ wxT( "%s
" ), message );
m_htmlWindow->AppendToPage( message_value );
}
diff --git a/common/libeval_compiler/libeval_compiler.cpp b/common/libeval_compiler/libeval_compiler.cpp
index d8b97f6613..bfcd3392d3 100644
--- a/common/libeval_compiler/libeval_compiler.cpp
+++ b/common/libeval_compiler/libeval_compiler.cpp
@@ -142,7 +142,7 @@ wxString UOP::Format() const
else if( m_value->GetType() == VT_NUMERIC )
str = wxString::Format( "PUSH NUM [%.10f]", m_value->AsDouble() );
else
- str = wxString::Format( "PUSH STR [%ls]", GetChars( m_value->AsString() ) );
+ str = wxString::Format( "PUSH STR [%ls]", m_value->AsString() );
}
break;
diff --git a/common/pgm_base.cpp b/common/pgm_base.cpp
index b39e6b1dcd..3548d954b3 100644
--- a/common/pgm_base.cpp
+++ b/common/pgm_base.cpp
@@ -211,10 +211,8 @@ bool PGM_BASE::InitPgm()
if( m_pgm_checker->IsAnotherRunning() )
{
- wxString quiz = wxString::Format(
- _( "%s is already running. Continue?" ),
- GetChars( pgm_name.GetName() )
- );
+ wxString quiz =
+ wxString::Format( _( "%s is already running. Continue?" ), pgm_name.GetName() );
if( !IsOK( NULL, quiz ) )
return false;
diff --git a/common/single_top.cpp b/common/single_top.cpp
index 21db06c7a1..40ad56d7b6 100644
--- a/common/single_top.cpp
+++ b/common/single_top.cpp
@@ -172,12 +172,11 @@ struct APP_SINGLE_TOP : public wxApp
catch( const std::exception& e )
{
wxLogError( wxT( "Unhandled exception class: %s what: %s" ),
- GetChars( FROM_UTF8( typeid(e).name() )),
- GetChars( FROM_UTF8( e.what() ) ) );
+ FROM_UTF8( typeid( e ).name() ), FROM_UTF8( e.what() ) );
}
catch( const IO_ERROR& ioe )
{
- wxLogError( GetChars( ioe.What() ) );
+ wxLogError( ioe.What() );
}
catch(...)
{
@@ -209,12 +208,11 @@ struct APP_SINGLE_TOP : public wxApp
catch( const std::exception& e )
{
wxLogError( wxT( "Unhandled exception class: %s what: %s" ),
- GetChars( FROM_UTF8( typeid(e).name() )),
- GetChars( FROM_UTF8( e.what() ) ) );
+ FROM_UTF8( typeid( e ).name() ), FROM_UTF8( e.what() ) );
}
catch( const IO_ERROR& ioe )
{
- wxLogError( GetChars( ioe.What() ) );
+ wxLogError( ioe.What() );
}
catch(...)
{
diff --git a/cvpcb/auto_associate.cpp b/cvpcb/auto_associate.cpp
index 8872a37c76..5892c0db85 100644
--- a/cvpcb/auto_associate.cpp
+++ b/cvpcb/auto_associate.cpp
@@ -103,7 +103,7 @@ int CVPCB_MAINFRAME::buildEquivalenceList( FOOTPRINT_EQUIVALENCE_LIST& aList, wx
{
error_msg.Printf( _( "Equivalence file \"%s\" could not be found in the "
"default search paths." ),
- GetChars( fn.GetFullName() ) );
+ fn.GetFullName() );
if( ! aErrorMessages->IsEmpty() )
*aErrorMessages << wxT("\n\n");
@@ -122,7 +122,7 @@ int CVPCB_MAINFRAME::buildEquivalenceList( FOOTPRINT_EQUIVALENCE_LIST& aList, wx
if( aErrorMessages )
{
- error_msg.Printf( _( "Error opening equivalence file \"%s\"." ), GetChars( tmp ) );
+ error_msg.Printf( _( "Error opening equivalence file \"%s\"." ), tmp );
if( ! aErrorMessages->IsEmpty() )
*aErrorMessages << wxT("\n\n");
@@ -258,8 +258,7 @@ void CVPCB_MAINFRAME::AutomaticFootprintMatching()
{
msg.Printf( _( "Component %s: footprint %s not found in any of the project "
"footprint libraries." ),
- GetChars( component->GetReference() ),
- GetChars( equivItem.m_FootprintFPID ) );
+ component->GetReference(), equivItem.m_FootprintFPID );
if( ! error_msg.IsEmpty() )
error_msg << wxT("\n\n");
diff --git a/cvpcb/cvpcb_mainframe.cpp b/cvpcb/cvpcb_mainframe.cpp
index 5217dc9085..50b963a0de 100644
--- a/cvpcb/cvpcb_mainframe.cpp
+++ b/cvpcb/cvpcb_mainframe.cpp
@@ -721,7 +721,7 @@ void CVPCB_MAINFRAME::DisplayStatus()
if( filters.IsEmpty() )
msg = _( "No filtering" );
else
- msg.Printf( _( "Filtered by %s" ), GetChars( filters ) );
+ msg.Printf( _( "Filtered by %s" ), filters );
msg << wxT( ": " ) << m_footprintListBox->GetCount();
diff --git a/cvpcb/dialogs/dialog_config_equfiles.cpp b/cvpcb/dialogs/dialog_config_equfiles.cpp
index 052314effe..e1f1a65c33 100644
--- a/cvpcb/dialogs/dialog_config_equfiles.cpp
+++ b/cvpcb/dialogs/dialog_config_equfiles.cpp
@@ -45,9 +45,8 @@ DIALOG_CONFIG_EQUFILES::DIALOG_CONFIG_EQUFILES( CVPCB_MAINFRAME* aParent ) :
{
m_Parent = aParent;
- PROJECT& prj = Prj();
- SetTitle( wxString::Format( _( "Project file: \"%s\"" ),
- GetChars( prj.GetProjectFullName() ) ) );
+ PROJECT& prj = Prj();
+ SetTitle( wxString::Format( _( "Project file: \"%s\"" ), prj.GetProjectFullName() ) );
Init( );
@@ -270,9 +269,8 @@ void DIALOG_CONFIG_EQUFILES::OnAddFiles( wxCommandEvent& event )
if( fn.MakeRelativeTo( libpath ) )
{
equFilename.Printf( wxT( "${%s}%c%s" ),
- GetChars( m_gridEnvVars->GetCellValue( wxGridCellCoords( row, 0 ) ) ),
- fn.GetPathSeparator(),
- GetChars( fn.GetFullPath() ) );
+ m_gridEnvVars->GetCellValue( wxGridCellCoords( row, 0 ) ),
+ fn.GetPathSeparator(), fn.GetFullPath() );
break;
}
}
diff --git a/cvpcb/readwrite_dlgs.cpp b/cvpcb/readwrite_dlgs.cpp
index 2a61431a4c..dc8f1c778f 100644
--- a/cvpcb/readwrite_dlgs.cpp
+++ b/cvpcb/readwrite_dlgs.cpp
@@ -145,16 +145,16 @@ bool CVPCB_MAINFRAME::ReadNetListAndFpFiles( const std::string& aNetlist )
case 1:
msg += wxString::Format( _(
"Component \"%s\" footprint \"%s\" was not found in any library.\n" ),
- GetChars( component->GetReference() ),
- GetChars( component->GetFPID().GetLibItemName() )
+ component->GetReference(),
+ component->GetFPID().GetLibItemName().wx_str()
);
break;
case 2:
msg += wxString::Format( _(
"Component \"%s\" footprint \"%s\" was found in multiple libraries.\n" ),
- GetChars( component->GetReference() ),
- GetChars( component->GetFPID().GetLibItemName() )
+ component->GetReference(),
+ component->GetFPID().GetLibItemName().wx_str()
);
break;
}
@@ -263,9 +263,9 @@ bool CVPCB_MAINFRAME::ReadNetListAndFpFiles( const std::string& aNetlist )
COMPONENT* component = m_netlist.GetComponent( i );
msg.Printf( CMP_FORMAT, m_compListBox->GetCount() + 1,
- GetChars( component->GetReference() ),
- GetChars( component->GetValue() ),
- GetChars( FROM_UTF8( component->GetFPID().Format().c_str() ) ) );
+ component->GetReference(),
+ component->GetValue(),
+ FROM_UTF8( component->GetFPID().Format().c_str() ) );
m_compListBox->AppendLine( msg );
}
diff --git a/eeschema/class_library.cpp b/eeschema/class_library.cpp
index 370326c664..66a0b546fa 100644
--- a/eeschema/class_library.cpp
+++ b/eeschema/class_library.cpp
@@ -554,7 +554,7 @@ void PART_LIBS::LoadAllLibraries( PROJECT* aProject, bool aShowProgress )
{
wxString msg;
msg.Printf( _( "Symbol library \"%s\" failed to load. Error:\n %s" ),
- GetChars( filename ), GetChars( ioe.What() ) );
+ filename, ioe.What() );
wxLogError( msg );
}
@@ -576,11 +576,9 @@ void PART_LIBS::LoadAllLibraries( PROJECT* aProject, bool aShowProgress )
}
catch( const IO_ERROR& ioe )
{
- wxString msg = wxString::Format( _(
- "Symbol library \"%s\" failed to load.\nError: %s" ),
- GetChars( cache_name ),
- GetChars( ioe.What() )
- );
+ wxString msg =
+ wxString::Format( _( "Symbol library \"%s\" failed to load.\nError: %s" ),
+ cache_name, ioe.What() );
THROW_IO_ERROR( msg );
}
diff --git a/eeschema/dialogs/dialog_plot_schematic.cpp b/eeschema/dialogs/dialog_plot_schematic.cpp
index ef94d25ba5..87007c34d4 100644
--- a/eeschema/dialogs/dialog_plot_schematic.cpp
+++ b/eeschema/dialogs/dialog_plot_schematic.cpp
@@ -163,7 +163,7 @@ void DIALOG_PLOT_SCHEMATIC::OnOutputDirectoryBrowseClicked( wxCommandEvent& even
// Test if making the path relative is possible before asking the user if they want to do it
if( relPathTest.MakeRelativeTo( defaultPath ) )
{
- msg.Printf( _( "Do you want to use a path relative to\n\"%s\"" ), GetChars( defaultPath ) );
+ msg.Printf( _( "Do you want to use a path relative to\n\"%s\"" ), defaultPath );
wxMessageDialog dialog( this, msg, _( "Plot Output Directory" ),
wxYES_NO | wxICON_QUESTION | wxYES_DEFAULT );
diff --git a/eeschema/libedit/lib_edit_frame.cpp b/eeschema/libedit/lib_edit_frame.cpp
index ff2cba6b06..f387b9506f 100644
--- a/eeschema/libedit/lib_edit_frame.cpp
+++ b/eeschema/libedit/lib_edit_frame.cpp
@@ -490,7 +490,7 @@ void LIB_EDIT_FRAME::RebuildSymbolUnitsList()
for( int i = 0; i < m_my_part->GetUnitCount(); i++ )
{
wxString sub = LIB_PART::SubReference( i+1, false );
- wxString unit = wxString::Format( _( "Unit %s" ), GetChars( sub ) );
+ wxString unit = wxString::Format( _( "Unit %s" ), sub );
m_unitSelectBox->Append( unit );
}
}
diff --git a/eeschema/libedit/libedit.cpp b/eeschema/libedit/libedit.cpp
index fba1cef354..0aac41aa71 100644
--- a/eeschema/libedit/libedit.cpp
+++ b/eeschema/libedit/libedit.cpp
@@ -677,7 +677,7 @@ void LIB_EDIT_FRAME::DuplicatePart( bool aFromClipboard )
}
catch( IO_ERROR& e )
{
- wxLogMessage( "Can not paste: %s", GetChars( e.Problem() ) );
+ wxLogMessage( "Can not paste: %s", e.Problem() );
return;
}
}
diff --git a/eeschema/netlist_exporters/netlist_exporter_cadstar.cpp b/eeschema/netlist_exporters/netlist_exporter_cadstar.cpp
index 3b0a256291..93967ef436 100644
--- a/eeschema/netlist_exporters/netlist_exporter_cadstar.cpp
+++ b/eeschema/netlist_exporters/netlist_exporter_cadstar.cpp
@@ -45,8 +45,7 @@ bool NETLIST_EXPORTER_CADSTAR::WriteNetlist( const wxString& aOutFileName, unsig
if( ( f = wxFopen( aOutFileName, wxT( "wt" ) ) ) == NULL )
{
wxString msg;
- msg.Printf( _( "Failed to create file \"%s\"" ),
- GetChars( aOutFileName ) );
+ msg.Printf( _( "Failed to create file \"%s\"" ), aOutFileName );
DisplayError( NULL, msg );
return false;
}
@@ -181,12 +180,9 @@ bool NETLIST_EXPORTER_CADSTAR::writeListOfNets( FILE* f )
switch( print_ter )
{
case 0:
- {
- InitNetDescLine.Printf( wxT( "\n%s %s %.4s %s" ),
- GetChars( InitNetDesc ),
- GetChars( refText ),
- GetChars( pinText ),
- GetChars( netName ) );
+ {
+ InitNetDescLine.Printf(
+ wxT( "\n%s %s %.4s %s" ), InitNetDesc, refText, pinText, netName );
}
print_ter++;
break;
diff --git a/eeschema/netlist_exporters/netlist_exporter_orcadpcb2.cpp b/eeschema/netlist_exporters/netlist_exporter_orcadpcb2.cpp
index 83824c2af2..fa225b22e3 100644
--- a/eeschema/netlist_exporters/netlist_exporter_orcadpcb2.cpp
+++ b/eeschema/netlist_exporters/netlist_exporter_orcadpcb2.cpp
@@ -50,8 +50,7 @@ bool NETLIST_EXPORTER_ORCADPCB2::WriteNetlist( const wxString& aOutFileName,
if( ( f = wxFopen( aOutFileName, wxT( "wt" ) ) ) == NULL )
{
wxString msg;
- msg.Printf( _( "Failed to create file \"%s\"" ),
- GetChars( aOutFileName ) );
+ msg.Printf( _( "Failed to create file \"%s\"" ), aOutFileName );
DisplayError( NULL, msg );
return false;
}
diff --git a/eeschema/sch_bitmap.cpp b/eeschema/sch_bitmap.cpp
index 2ad4fc9954..5d62a7b268 100644
--- a/eeschema/sch_bitmap.cpp
+++ b/eeschema/sch_bitmap.cpp
@@ -93,8 +93,8 @@ EDA_ITEM* SCH_BITMAP::Clone() const
void SCH_BITMAP::SwapData( SCH_ITEM* aItem )
{
wxCHECK_RET( aItem->Type() == SCH_BITMAP_T,
- wxString::Format( wxT( "SCH_BITMAP object cannot swap data with %s object." ),
- GetChars( aItem->GetClass() ) ) );
+ wxString::Format( wxT( "SCH_BITMAP object cannot swap data with %s object." ),
+ aItem->GetClass() ) );
SCH_BITMAP* item = (SCH_BITMAP*) aItem;
std::swap( m_pos, item->m_pos );
diff --git a/eeschema/sch_plugins/kicad/sch_sexpr_parser.cpp b/eeschema/sch_plugins/kicad/sch_sexpr_parser.cpp
index 25a9e1f3d4..e6ea858745 100644
--- a/eeschema/sch_plugins/kicad/sch_sexpr_parser.cpp
+++ b/eeschema/sch_plugins/kicad/sch_sexpr_parser.cpp
@@ -1488,7 +1488,7 @@ void SCH_SEXPR_PARSER::parsePAGE_INFO( PAGE_INFO& aPageInfo )
if( !aPageInfo.SetType( pageType ) )
{
wxString err;
- err.Printf( _( "Page type \"%s\" is not valid " ), GetChars( FromUTF8() ) );
+ err.Printf( _( "Page type \"%s\" is not valid " ), FromUTF8() );
THROW_PARSE_ERROR( err, CurSource(), CurLine(), CurLineNumber(), CurOffset() );
}
@@ -2101,7 +2101,7 @@ SCH_COMPONENT* SCH_SEXPR_PARSER::parseSchematicSymbol()
{
error.Printf( _( "Invalid symbol library ID in\nfile: \"%s\"\nline: %d\n"
"offset: %d" ),
- GetChars( CurSource() ), CurLineNumber(), CurOffset() );
+ CurSource(), CurLineNumber(), CurOffset() );
THROW_IO_ERROR( error );
}
diff --git a/eeschema/sch_plugins/legacy/sch_legacy_plugin.cpp b/eeschema/sch_plugins/legacy/sch_legacy_plugin.cpp
index 5b81c41236..09dbc41af3 100644
--- a/eeschema/sch_plugins/legacy/sch_legacy_plugin.cpp
+++ b/eeschema/sch_plugins/legacy/sch_legacy_plugin.cpp
@@ -806,8 +806,8 @@ void SCH_LEGACY_PLUGIN::loadHeader( LINE_READER& aReader, SCH_SCREEN* aScreen )
if( !line || !strCompare( "Eeschema Schematic File Version", line, &line ) )
{
- m_error.Printf( _( "\"%s\" does not appear to be an Eeschema file" ),
- GetChars( aScreen->GetFileName() ) );
+ m_error.Printf(
+ _( "\"%s\" does not appear to be an Eeschema file" ), aScreen->GetFileName() );
THROW_IO_ERROR( m_error );
}
diff --git a/eeschema/sch_sheet.cpp b/eeschema/sch_sheet.cpp
index 98a4e4fa09..1c00f628a4 100644
--- a/eeschema/sch_sheet.cpp
+++ b/eeschema/sch_sheet.cpp
@@ -250,8 +250,8 @@ bool SCH_SHEET::UsesDefaultStroke() const
void SCH_SHEET::SwapData( SCH_ITEM* aItem )
{
wxCHECK_RET( aItem->Type() == SCH_SHEET_T,
- wxString::Format( wxT( "SCH_SHEET object cannot swap data with %s object." ),
- GetChars( aItem->GetClass() ) ) );
+ wxString::Format( wxT( "SCH_SHEET object cannot swap data with %s object." ),
+ aItem->GetClass() ) );
SCH_SHEET* sheet = ( SCH_SHEET* ) aItem;
diff --git a/eeschema/sch_sheet_pin.cpp b/eeschema/sch_sheet_pin.cpp
index b5002daec6..9862418c88 100644
--- a/eeschema/sch_sheet_pin.cpp
+++ b/eeschema/sch_sheet_pin.cpp
@@ -74,8 +74,8 @@ void SCH_SHEET_PIN::Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
void SCH_SHEET_PIN::SwapData( SCH_ITEM* aItem )
{
wxCHECK_RET( aItem->Type() == SCH_SHEET_PIN_T,
- wxString::Format( wxT( "SCH_SHEET_PIN object cannot swap data with %s object." ),
- GetChars( aItem->GetClass() ) ) );
+ wxString::Format( wxT( "SCH_SHEET_PIN object cannot swap data with %s object." ),
+ aItem->GetClass() ) );
SCH_SHEET_PIN* pin = ( SCH_SHEET_PIN* ) aItem;
SCH_TEXT::SwapData( (SCH_TEXT*) pin );
diff --git a/eeschema/sch_text.cpp b/eeschema/sch_text.cpp
index cb782960f8..228106a9f1 100644
--- a/eeschema/sch_text.cpp
+++ b/eeschema/sch_text.cpp
@@ -547,7 +547,7 @@ wxString SCH_TEXT::GetShownText( int aDepth ) const
wxString SCH_TEXT::GetSelectMenuText( EDA_UNITS aUnits ) const
{
- return wxString::Format( _( "Graphic Text '%s'" ), GetChars( ShortenedShownText() ) );
+ return wxString::Format( _( "Graphic Text '%s'" ), ShortenedShownText() );
}
diff --git a/eeschema/symbol_lib_table.cpp b/eeschema/symbol_lib_table.cpp
index e7f2085919..3b9c7410cb 100644
--- a/eeschema/symbol_lib_table.cpp
+++ b/eeschema/symbol_lib_table.cpp
@@ -227,7 +227,7 @@ void SYMBOL_LIB_TABLE::Parse( LIB_TABLE_LEXER* in )
wxString msg = wxString::Format(
_( "Duplicate library nickname \"%s\" found in symbol library "
- "table file line %d" ), GetChars( nickname ), lineNum );
+ "table file line %d" ), nickname, lineNum );
if( !errMsg.IsEmpty() )
errMsg << '\n';
@@ -492,8 +492,8 @@ bool SYMBOL_LIB_TABLE::LoadGlobalTable( SYMBOL_LIB_TABLE& aTable )
if( !fn.DirExists() && !fn.Mkdir( 0x777, wxPATH_MKDIR_FULL ) )
{
- THROW_IO_ERROR( wxString::Format( _( "Cannot create global library table path \"%s\"." ),
- GetChars( fn.GetPath() ) ) );
+ THROW_IO_ERROR( wxString::Format(
+ _( "Cannot create global library table path \"%s\"." ), fn.GetPath() ) );
}
// Attempt to copy the default global file table from the KiCad
diff --git a/gerbview/files.cpp b/gerbview/files.cpp
index 2d8f7473b7..23efccba30 100644
--- a/gerbview/files.cpp
+++ b/gerbview/files.cpp
@@ -525,7 +525,7 @@ bool GERBVIEW_FRAME::unarchiveFiles( const wxString& aFullFileName, REPORTER* aR
reported_no_more_layer = true;
// Report the name of not loaded files:
- msg.Printf( MSG_NOT_LOADED, GetChars( entry->GetName() ) );
+ msg.Printf( MSG_NOT_LOADED, entry->GetName() );
aReporter->Report( msg, RPT_SEVERITY_ERROR );
}
diff --git a/gerbview/gerber_file_image_list.cpp b/gerbview/gerber_file_image_list.cpp
index 5fc2b2cea7..d7a3fb2774 100644
--- a/gerbview/gerber_file_image_list.cpp
+++ b/gerbview/gerber_file_image_list.cpp
@@ -151,25 +151,25 @@ const wxString GERBER_FILE_IMAGE_LIST::GetDisplayName( int aIdx, bool aNameOnly
{
name.Printf( "%s (%s, %s, %s)",
filename.GetData(),
- GetChars( gerber->m_FileFunction->GetFileType() ),
- GetChars( gerber->m_FileFunction->GetBrdLayerId() ),
- GetChars( gerber->m_FileFunction->GetBrdLayerSide() ) );
+ gerber->m_FileFunction->GetFileType(),
+ gerber->m_FileFunction->GetBrdLayerId(),
+ gerber->m_FileFunction->GetBrdLayerSide() );
}
if( gerber->m_FileFunction->IsDrillFile() )
{
name.Printf( "%s (%s,%s,%s,%s)",
filename.GetData(),
- GetChars( gerber->m_FileFunction->GetFileType() ),
- GetChars( gerber->m_FileFunction->GetDrillLayerPair() ),
- GetChars( gerber->m_FileFunction->GetLPType() ),
- GetChars( gerber->m_FileFunction->GetRouteType() ) );
+ gerber->m_FileFunction->GetFileType(),
+ gerber->m_FileFunction->GetDrillLayerPair(),
+ gerber->m_FileFunction->GetLPType(),
+ gerber->m_FileFunction->GetRouteType() );
}
else
{
name.Printf( "%s (%s, %s)",
filename.GetData(),
- GetChars( gerber->m_FileFunction->GetFileType() ),
- GetChars( gerber->m_FileFunction->GetBrdLayerId() ) );
+ gerber->m_FileFunction->GetFileType(),
+ gerber->m_FileFunction->GetBrdLayerId() );
}
}
else
diff --git a/gerbview/rs274x.cpp b/gerbview/rs274x.cpp
index 4727a1ea5a..da5c2f3aad 100644
--- a/gerbview/rs274x.cpp
+++ b/gerbview/rs274x.cpp
@@ -1014,7 +1014,7 @@ bool GERBER_FILE_IMAGE::ReadApertureMacro( char *aBuff, unsigned int aBuffSize,
else if( !isdigit(*aText) ) // Ill. symbol
{
msg.Printf( wxT( "RS274X: Aperture Macro \"%s\": ill. symbol, line: \"%s\"" ),
- GetChars( am.name ), GetChars( FROM_UTF8( aBuff ) ) );
+ am.name, FROM_UTF8( aBuff ) );
AddMessageToList( msg );
primitive_type = AMP_COMMENT;
}
@@ -1072,7 +1072,7 @@ bool GERBER_FILE_IMAGE::ReadApertureMacro( char *aBuff, unsigned int aBuffSize,
default:
msg.Printf( wxT( "RS274X: Aperture Macro \"%s\": Invalid primitive id code %d, line %d: \"%s\"" ),
- GetChars( am.name ), primitive_type, m_LineNum, GetChars( FROM_UTF8( aBuff ) ) );
+ am.name, primitive_type, m_LineNum, FROM_UTF8( aBuff ) );
AddMessageToList( msg );
return false;
}
diff --git a/gerbview/tools/gerbview_inspection_tool.cpp b/gerbview/tools/gerbview_inspection_tool.cpp
index 7d48154f40..02ae4b8ca5 100644
--- a/gerbview/tools/gerbview_inspection_tool.cpp
+++ b/gerbview/tools/gerbview_inspection_tool.cpp
@@ -127,7 +127,7 @@ int GERBVIEW_INSPECTION_TOOL::ShowDCodes( const TOOL_EVENT& aEvent )
pt_D_code->m_Size.y / scale, units,
pt_D_code->m_Size.x / scale, units,
D_CODE::ShowApertureType( pt_D_code->m_Shape ),
- pt_D_code->m_AperFunction.IsEmpty()? wxT( "none" ) : GetChars( pt_D_code->m_AperFunction )
+ pt_D_code->m_AperFunction.IsEmpty()? wxT( "none" ) : pt_D_code->m_AperFunction
);
if( !pt_D_code->m_Defined )
@@ -169,8 +169,7 @@ int GERBVIEW_INSPECTION_TOOL::ShowSource( const TOOL_EVENT& aEvent )
if( !fn.FileExists() )
{
wxString msg;
- msg.Printf( _( "Source file \"%s\" is not available" ),
- GetChars( fn.GetFullPath() ) );
+ msg.Printf( _( "Source file \"%s\" is not available" ), fn.GetFullPath() );
wxMessageBox( msg );
}
else
diff --git a/gerbview/tools/gerbview_selection_tool.cpp b/gerbview/tools/gerbview_selection_tool.cpp
index f291e17fb1..dc725470fd 100644
--- a/gerbview/tools/gerbview_selection_tool.cpp
+++ b/gerbview/tools/gerbview_selection_tool.cpp
@@ -71,8 +71,8 @@ private:
( net_attr.m_NetAttribType & GBR_NETLIST_METADATA::GBR_NETINFO_CMP ) )
{
auto menuEntry = Add( GERBVIEW_ACTIONS::highlightComponent );
- menuEntry->SetItemLabel( wxString::Format( _( "Highlight Items of Component \"%s\"" ),
- GetChars( net_attr.m_Cmpref ) ) );
+ menuEntry->SetItemLabel( wxString::Format(
+ _( "Highlight Items of Component \"%s\"" ), net_attr.m_Cmpref ) );
addSeparator = true;
}
@@ -89,8 +89,8 @@ private:
if( apertDescr && !apertDescr->m_AperFunction.IsEmpty() )
{
auto menuEntry = Add( GERBVIEW_ACTIONS::highlightAttribute );
- menuEntry->SetItemLabel( wxString::Format( _( "Highlight Aperture Type \"%s\"" ),
- GetChars( apertDescr->m_AperFunction ) ) );
+ menuEntry->SetItemLabel( wxString::Format(
+ _( "Highlight Aperture Type \"%s\"" ), apertDescr->m_AperFunction ) );
addSeparator = true;
}
}
diff --git a/include/macros.h b/include/macros.h
index 7c4b0a2133..8ebf6c7878 100644
--- a/include/macros.h
+++ b/include/macros.h
@@ -122,30 +122,6 @@ static inline wxString FROM_UTF8( const char* cstring )
return line;
}
-/**
- * Function GetChars
- * returns a wxChar* to the actual wxChar* data within a wxString, and is
- * helpful for passing strings to wxString::Printf() and wxString::Format().
- * It can also be passed a UTF8 parameter which will be converted to wxString
- * by the compiler.
- *
- * Example: wxString::Format( wxT( "%s" ), GetChars( UTF( "some text" ) ) ); - *
- * When wxWidgets is properly built for KiCad, a const wxChar* points to either: - *