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
|
||||
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
|
||||
returnStr += remainingStr;
|
||||
|
@ -804,7 +804,7 @@ wxString CADSTAR_ARCHIVE_PARSER::ParseTextFields( wxString aTextString, PARSER_C
|
|||
//Now lets find the end token
|
||||
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
|
||||
// Lets append the whole thing as plain text
|
||||
|
|
|
@ -51,8 +51,9 @@
|
|||
void KICAD_MANAGER_FRAME::ImportNonKiCadProject( wxString aWindowTitle, wxString aFilesWildcard,
|
||||
wxString aSchFileExtension, wxString aPcbFileExtension, int aSchFileType, int aPcbFileType )
|
||||
{
|
||||
int style = wxFD_OPEN | wxFD_FILE_MUST_EXIST;
|
||||
wxString msg;
|
||||
wxString default_dir = GetMruPath();
|
||||
int style = wxFD_OPEN | wxFD_FILE_MUST_EXIST;
|
||||
|
||||
ClearMsg();
|
||||
|
||||
|
@ -61,7 +62,6 @@ void KICAD_MANAGER_FRAME::ImportNonKiCadProject( wxString aWindowTitle, wxString
|
|||
if( schdlg.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
|
||||
wxFileName sch( schdlg.GetPath() );
|
||||
sch.SetExt( aSchFileExtension );
|
||||
|
||||
|
@ -87,8 +87,7 @@ void KICAD_MANAGER_FRAME::ImportNonKiCadProject( wxString aWindowTitle, wxString
|
|||
|
||||
if( directory.HasFiles() )
|
||||
{
|
||||
wxString msg =
|
||||
_( "The selected directory is not empty. We recommend you "
|
||||
msg = _( "The selected directory is not empty. We recommend you "
|
||||
"create projects in their own clean directory.\n\nDo you "
|
||||
"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() ) )
|
||||
{
|
||||
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." );
|
||||
|
||||
wxMessageDialog dlg( this, msg, _( "Error" ), wxOK_DEFAULT | wxICON_ERROR );
|
||||
dlg.ShowModal();
|
||||
wxMessageDialog dirErrorDlg( this, msg, _( "Error" ), wxOK_DEFAULT | wxICON_ERROR );
|
||||
dirErrorDlg.ShowModal();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
std::string packet;
|
||||
|
||||
pro.SetExt( ProjectFileExtension );
|
||||
|
|
Loading…
Reference in New Issue