Fix a minor compil warning and a Coverity warning

This commit is contained in:
jean-pierre charras 2020-07-30 10:40:51 +02:00
parent b3f638caaf
commit 265f28afe1
2 changed files with 9 additions and 1 deletions

View File

@ -52,6 +52,8 @@ SHAPE_COMPOUND::SHAPE_COMPOUND( const SHAPE_COMPOUND& aOther )
{
for ( auto shape : aOther.Shapes() )
m_shapes.push_back( shape->Clone() );
m_dirty = true;
}
@ -95,6 +97,7 @@ void SHAPE_COMPOUND::Move ( const VECTOR2I& aVector )
int SHAPE_COMPOUND::Distance( const SEG& aSeg ) const
{
assert(false);
return 0; // Make compiler happy
}

View File

@ -898,7 +898,12 @@ bool PCBMODEL::WriteSTEP( const wxString& aFileName )
if( success )
{
wxRenameFile( tmpfname, fn.GetFullName(), true );
if( !wxRenameFile( tmpfname, fn.GetFullName(), true ) )
{
ReportMessage( wxString::Format( "Cannot rename temporary file '%s' to '%s'\n",
tmpfname, fn.GetFullName() ) );
success = false;
}
}
wxSetWorkingDirectory( currCWD );