CADSTAR Schematic / PCB Archive Importers: Fix string formatting asserts

This commit is contained in:
Roberto Fernandez Bautista 2020-09-27 16:12:39 +01:00
parent 93242eb3ad
commit 6f5f6a0fba
3 changed files with 6 additions and 6 deletions

View File

@ -486,7 +486,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadNets()
std::map<NETELEMENT_ID, SCH_LABEL*> netlabels;
if( netName.IsEmpty() )
netName = wxString::Format( "$%d", net.SignalNum );
netName = wxString::Format( "$%d", int{ net.SignalNum } );
for( std::pair<NETELEMENT_ID, NET_SCH::SYM_TERM> terminalPair : net.Terminals )
@ -765,7 +765,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadSymDefIntoLibrary( const SYMDEF_ID& aSymdef
for( std::pair<TERMINAL_ID, TERMINAL> termPair : symbol.Terminals )
{
TERMINAL term = termPair.second;
wxString pinNum = wxString::Format( "%d", term.ID );
wxString pinNum = wxString::Format( "%d", int{ term.ID } );
wxString pinName = wxEmptyString;
if( aCadstarPart )
@ -773,7 +773,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadSymDefIntoLibrary( const SYMDEF_ID& aSymdef
PART::DEFINITION::PIN csPin = getPartDefinitionPin( *aCadstarPart, aGateID, term.ID );
pinName = csPin.Name;
pinNum = wxString::Format( "%d", csPin.ID );
pinNum = wxString::Format( "%d", int{ csPin.ID } );
if( pinName.IsEmpty() )
{
@ -1148,7 +1148,7 @@ wxString CADSTAR_SCH_ARCHIVE_LOADER::getNetName( const NET_SCH& aNet )
wxString netname = aNet.Name;
if( netname.IsEmpty() )
netname = wxString::Format( "$%d", aNet.SignalNum );
netname = wxString::Format( "$%d", int{ aNet.SignalNum } );
return netname;
}

View File

@ -298,7 +298,7 @@ void CADSTAR_SCH_ARCHIVE_PARSER::TERMINAL::Parse( XNODE* aNode )
TerminalCodeID = GetXmlAttributeIDString( aNode, 1 );
XNODE* cNode = aNode->GetChildren();
wxString location = wxString::Format( "TERMINAL %d", ID );
wxString location = wxString::Format( "TERMINAL %d", int{ ID } );
if( !cNode )
THROW_MISSING_NODE_IO_ERROR( wxT( "PT" ), location );

View File

@ -1134,7 +1134,7 @@ void CADSTAR_PCB_ARCHIVE_PARSER::PAD::Parse( XNODE* aNode )
Side = GetPadSide( GetXmlAttributeIDString( aNode, 3 ) );
XNODE* cNode = aNode->GetChildren();
wxString location = wxString::Format( "PAD %d", ID );
wxString location = wxString::Format( "PAD %d", int{ ID } );
if( !cNode )
THROW_MISSING_NODE_IO_ERROR( wxT( "PT" ), location );