Commit 69fd16ed authored by dickelbeck's avatar dickelbeck

switch to GetChars() and away from wxString::GetData()

parent 0350744a
......@@ -321,9 +321,7 @@ void SPECCTRA_DB::LoadPCB( const wxString& filename ) throw( IOError )
if( !fp )
{
wxString msg;
msg.Printf( _("Unable to open file \"%s\""), filename.GetData() );
ThrowIOError( msg );
ThrowIOError( _("Unable to open file \"%s\""), GetChars(filename) );
}
file.Attach( fp ); // "exception safe" way to close the file.
......@@ -353,9 +351,7 @@ void SPECCTRA_DB::LoadSESSION( const wxString& filename ) throw( IOError )
if( !fp )
{
wxString msg;
msg.Printf( _("Unable to open file \"%s\""), filename.GetData() );
ThrowIOError( msg );
ThrowIOError( _("Unable to open file \"%s\""), GetChars(filename) );
}
file.Attach( fp ); // "exception safe" way to close the file.
......@@ -3470,9 +3466,7 @@ int SPECCTRA_DB::Print( int nestLevel, const char* fmt, ... ) throw( IOError )
if( result<0 || (result=vfprintf( fp, fmt, args ))<0 )
{
wxString msg;
msg.Printf( _("System file error writing to file \"%s\""), filename.GetData() );
ThrowIOError( msg );
ThrowIOError( _("System file error writing to file \"%s\""), GetChars(filename) );
}
va_end( args );
......@@ -3529,9 +3523,7 @@ void SPECCTRA_DB::ExportPCB( wxString filename, bool aNameChange ) throw( IOErro
if( !fp )
{
wxString msg;
msg.Printf( _("Unable to open file \"%s\""), filename.GetData() );
ThrowIOError( msg );
ThrowIOError( _("Unable to open file \"%s\""), GetChars(filename) );
}
if( pcb )
......@@ -3556,9 +3548,7 @@ void SPECCTRA_DB::ExportSESSION( wxString filename )
if( !fp )
{
wxString msg;
msg.Printf( _("Unable to open file \"%s\""), filename.GetData() );
ThrowIOError( msg );
ThrowIOError( _("Unable to open file \"%s\""), GetChars(filename) );
}
if( session )
......
......@@ -868,7 +868,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IOError )
if( module->GetReference() == wxEmptyString )
{
ThrowIOError( _("Component with value of \"%s\" has empty reference id."),
module->GetValue().GetData() );
GetChars( module->GetValue() ) );
}
// if we cannot insert OK, that means the reference has been seen before.
......@@ -876,7 +876,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IOError )
if( !refpair.second ) // insert failed
{
ThrowIOError( _("Multiple components have identical reference IDs of \"%s\"."),
module->GetReference().GetData() );
GetChars( module->GetReference() ) );
}
}
}
......
......@@ -115,7 +115,7 @@ void WinEDA_PcbFrame::ImportSpecctraSession( wxCommandEvent& event )
GetScreen()->SetModify();
GetBoard()->m_Status_Pcb = 0;
/* At this point we should call Compile_Ratsnest()
* but this could be time consumming.
* So if incorrect number of Connecred and No connected pads is accepted
......@@ -201,7 +201,7 @@ TRACK* SPECCTRA_DB::makeTRACK( PATH* aPath, int aPointIndex, int aNetcode ) thro
{
wxString layerName = CONV_FROM_UTF8( aPath->layer_id.c_str() );
ThrowIOError( _("Session file uses invalid layer id \"%s\""),
layerName.GetData() );
GetChars(layerName) );
}
TRACK* track = new TRACK( sessionBoard );
......@@ -258,7 +258,7 @@ SEGVIA* SPECCTRA_DB::makeVIA( PADSTACK* aPadstack, const POINT& aPoint, int aNet
DSN_T type = shape->shape->Type();
if( type != T_circle )
ThrowIOError( _( "Unsupported via shape: \"%s\""),
LEXER::GetTokenString( type ).GetData() );
GetChars( LEXER::GetTokenString( type ) ) );
CIRCLE* circle = (CIRCLE*) shape->shape;
int viaDiam = scale( circle->diameter, routeResolution );
......@@ -276,7 +276,7 @@ SEGVIA* SPECCTRA_DB::makeVIA( PADSTACK* aPadstack, const POINT& aPoint, int aNet
DSN_T type = shape->shape->Type();
if( type != T_circle )
ThrowIOError( _( "Unsupported via shape: \"%s\""),
LEXER::GetTokenString( type ).GetData() );
GetChars( LEXER::GetTokenString( type ) ) );
CIRCLE* circle = (CIRCLE*) shape->shape;
int viaDiam = scale( circle->diameter, routeResolution );
......@@ -300,7 +300,7 @@ SEGVIA* SPECCTRA_DB::makeVIA( PADSTACK* aPadstack, const POINT& aPoint, int aNet
DSN_T type = shape->shape->Type();
if( type != T_circle )
ThrowIOError( _( "Unsupported via shape: \"%s\""),
LEXER::GetTokenString( type ).GetData() );
GetChars( LEXER::GetTokenString( type ) ) );
CIRCLE* circle = (CIRCLE*) shape->shape;
......@@ -309,7 +309,7 @@ SEGVIA* SPECCTRA_DB::makeVIA( PADSTACK* aPadstack, const POINT& aPoint, int aNet
{
wxString layerName = CONV_FROM_UTF8( circle->layer_id.c_str() );
ThrowIOError( _("Session file uses invalid layer id \"%s\""),
layerName.GetData() );
GetChars( layerName ) );
}
if( layerNdx > topLayerNdx )
......@@ -392,7 +392,7 @@ void SPECCTRA_DB::FromSESSION( BOARD* aBoard ) throw( IOError )
{
ThrowIOError(
_("Session file has 'reference' to non-existent component \"%s\""),
reference.GetData() );
GetChars( reference ) );
}
if( !place->hasVertex )
......@@ -536,7 +536,7 @@ void SPECCTRA_DB::FromSESSION( BOARD* aBoard ) throw( IOError )
wxString psid( CONV_FROM_UTF8( wire_via->GetPadstackId().c_str() ) );
ThrowIOError( _("A wire_via references a missing padstack \"%s\""),
psid.GetData() );
GetChars( psid ) );
}
for( unsigned v=0; v<wire_via->vertexes.size(); ++v )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment