Loading pcbnew/specctra.cpp +5 −15 Original line number Diff line number Diff line Loading @@ -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. Loading Loading @@ -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. Loading Loading @@ -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 ); Loading Loading @@ -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 ) Loading @@ -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 ) Loading pcbnew/specctra_export.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -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. Loading @@ -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() ) ); } } } Loading pcbnew/specctra_import.cpp +8 −8 Original line number Diff line number Diff line Loading @@ -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 ); Loading Loading @@ -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 ); Loading @@ -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 ); Loading @@ -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; Loading @@ -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 ) Loading Loading @@ -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 ) Loading Loading @@ -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 ) Loading Loading
pcbnew/specctra.cpp +5 −15 Original line number Diff line number Diff line Loading @@ -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. Loading Loading @@ -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. Loading Loading @@ -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 ); Loading Loading @@ -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 ) Loading @@ -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 ) Loading
pcbnew/specctra_export.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -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. Loading @@ -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() ) ); } } } Loading
pcbnew/specctra_import.cpp +8 −8 Original line number Diff line number Diff line Loading @@ -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 ); Loading Loading @@ -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 ); Loading @@ -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 ); Loading @@ -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; Loading @@ -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 ) Loading Loading @@ -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 ) Loading Loading @@ -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 ) Loading