Fix some build warnings in the importer code.
This commit is contained in:
parent
8d81abb57a
commit
f6a1d703ec
|
@ -767,7 +767,7 @@ wxString CADSTAR_ARCHIVE_PARSER::ParseTextFields( wxString aTextString, PARSER_C
|
||||||
//Find the start token
|
//Find the start token
|
||||||
size_t startpos = remainingStr.Find( wxT( "<@" ) );
|
size_t startpos = remainingStr.Find( wxT( "<@" ) );
|
||||||
|
|
||||||
if( startpos == wxNOT_FOUND )
|
if( static_cast<int>( startpos ) == wxNOT_FOUND )
|
||||||
{
|
{
|
||||||
// No more fields to parse, add to return string
|
// No more fields to parse, add to return string
|
||||||
returnStr += remainingStr;
|
returnStr += remainingStr;
|
||||||
|
@ -804,7 +804,7 @@ wxString CADSTAR_ARCHIVE_PARSER::ParseTextFields( wxString aTextString, PARSER_C
|
||||||
//Now lets find the end token
|
//Now lets find the end token
|
||||||
size_t endpos = remainingStr.Find( wxT( "@>" ) );
|
size_t endpos = remainingStr.Find( wxT( "@>" ) );
|
||||||
|
|
||||||
if( endpos == wxNOT_FOUND )
|
if( static_cast<int>( endpos ) == wxNOT_FOUND )
|
||||||
{
|
{
|
||||||
// The field we found isn't valid as it doesn't have a termination
|
// The field we found isn't valid as it doesn't have a termination
|
||||||
// Lets append the whole thing as plain text
|
// Lets append the whole thing as plain text
|
||||||
|
|
|
@ -51,8 +51,9 @@
|
||||||
void KICAD_MANAGER_FRAME::ImportNonKiCadProject( wxString aWindowTitle, wxString aFilesWildcard,
|
void KICAD_MANAGER_FRAME::ImportNonKiCadProject( wxString aWindowTitle, wxString aFilesWildcard,
|
||||||
wxString aSchFileExtension, wxString aPcbFileExtension, int aSchFileType, int aPcbFileType )
|
wxString aSchFileExtension, wxString aPcbFileExtension, int aSchFileType, int aPcbFileType )
|
||||||
{
|
{
|
||||||
int style = wxFD_OPEN | wxFD_FILE_MUST_EXIST;
|
wxString msg;
|
||||||
wxString default_dir = GetMruPath();
|
wxString default_dir = GetMruPath();
|
||||||
|
int style = wxFD_OPEN | wxFD_FILE_MUST_EXIST;
|
||||||
|
|
||||||
ClearMsg();
|
ClearMsg();
|
||||||
|
|
||||||
|
@ -61,7 +62,6 @@ void KICAD_MANAGER_FRAME::ImportNonKiCadProject( wxString aWindowTitle, wxString
|
||||||
if( schdlg.ShowModal() == wxID_CANCEL )
|
if( schdlg.ShowModal() == wxID_CANCEL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
wxFileName sch( schdlg.GetPath() );
|
wxFileName sch( schdlg.GetPath() );
|
||||||
sch.SetExt( aSchFileExtension );
|
sch.SetExt( aSchFileExtension );
|
||||||
|
|
||||||
|
@ -87,8 +87,7 @@ void KICAD_MANAGER_FRAME::ImportNonKiCadProject( wxString aWindowTitle, wxString
|
||||||
|
|
||||||
if( directory.HasFiles() )
|
if( directory.HasFiles() )
|
||||||
{
|
{
|
||||||
wxString msg =
|
msg = _( "The selected directory is not empty. We recommend you "
|
||||||
_( "The selected directory is not empty. We recommend you "
|
|
||||||
"create projects in their own clean directory.\n\nDo you "
|
"create projects in their own clean directory.\n\nDo you "
|
||||||
"want to create a new empty directory for the project?" );
|
"want to create a new empty directory for the project?" );
|
||||||
|
|
||||||
|
@ -113,17 +112,16 @@ void KICAD_MANAGER_FRAME::ImportNonKiCadProject( wxString aWindowTitle, wxString
|
||||||
|
|
||||||
if( !wxMkdir( pro.GetPath() ) )
|
if( !wxMkdir( pro.GetPath() ) )
|
||||||
{
|
{
|
||||||
wxString msg = _( "Error creating new directory. Please try a different path. The "
|
msg = _( "Error creating new directory. Please try a different path. The "
|
||||||
"project was not imported." );
|
"project was not imported." );
|
||||||
|
|
||||||
wxMessageDialog dlg( this, msg, _( "Error" ), wxOK_DEFAULT | wxICON_ERROR );
|
wxMessageDialog dirErrorDlg( this, msg, _( "Error" ), wxOK_DEFAULT | wxICON_ERROR );
|
||||||
dlg.ShowModal();
|
dirErrorDlg.ShowModal();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string packet;
|
std::string packet;
|
||||||
|
|
||||||
pro.SetExt( ProjectFileExtension );
|
pro.SetExt( ProjectFileExtension );
|
||||||
|
|
Loading…
Reference in New Issue