Coverity issue fixes.
This commit is contained in:
parent
24f8bf2adf
commit
fb21eb7457
|
@ -64,7 +64,7 @@ CLI::EXPORT_PCB_DXF_COMMAND::EXPORT_PCB_DXF_COMMAND() : EXPORT_PCB_BASE_COMMAND(
|
|||
|
||||
int CLI::EXPORT_PCB_DXF_COMMAND::Perform( KIWAY& aKiway ) const
|
||||
{
|
||||
JOB_EXPORT_PCB_DXF* dxfJob = new JOB_EXPORT_PCB_DXF( true );
|
||||
std::unique_ptr<JOB_EXPORT_PCB_DXF> dxfJob( new JOB_EXPORT_PCB_DXF( true ) );
|
||||
|
||||
dxfJob->m_filename = FROM_UTF8( m_argParser.get<std::string>( ARG_INPUT ).c_str() );
|
||||
dxfJob->m_outputFile = FROM_UTF8( m_argParser.get<std::string>( ARG_OUTPUT ).c_str() );
|
||||
|
@ -101,7 +101,7 @@ int CLI::EXPORT_PCB_DXF_COMMAND::Perform( KIWAY& aKiway ) const
|
|||
|
||||
dxfJob->m_printMaskLayer = layerMask;
|
||||
|
||||
int exitCode = aKiway.ProcessJob( KIWAY::FACE_PCB, dxfJob );
|
||||
int exitCode = aKiway.ProcessJob( KIWAY::FACE_PCB, dxfJob.get() );
|
||||
|
||||
return exitCode;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ CLI::EXPORT_PCB_SVG_COMMAND::EXPORT_PCB_SVG_COMMAND() : EXPORT_PCB_BASE_COMMAND(
|
|||
|
||||
int CLI::EXPORT_PCB_SVG_COMMAND::Perform( KIWAY& aKiway ) const
|
||||
{
|
||||
JOB_EXPORT_PCB_SVG* svgJob = new JOB_EXPORT_PCB_SVG( true );
|
||||
std::unique_ptr<JOB_EXPORT_PCB_SVG> svgJob( new JOB_EXPORT_PCB_SVG( true ) );
|
||||
|
||||
svgJob->m_mirror = m_argParser.get<bool>( ARG_MIRROR );
|
||||
svgJob->m_blackAndWhite = m_argParser.get<bool>( ARG_BLACKANDWHITE );
|
||||
|
@ -78,7 +78,6 @@ int CLI::EXPORT_PCB_SVG_COMMAND::Perform( KIWAY& aKiway ) const
|
|||
if( !wxFile::Exists( svgJob->m_filename ) )
|
||||
{
|
||||
wxFprintf( stderr, _( "Board file does not exist or is not accessible\n" ) );
|
||||
delete svgJob;
|
||||
return EXIT_CODES::ERR_INVALID_INPUT_FILE;
|
||||
}
|
||||
|
||||
|
@ -88,9 +87,7 @@ int CLI::EXPORT_PCB_SVG_COMMAND::Perform( KIWAY& aKiway ) const
|
|||
|
||||
svgJob->m_printMaskLayer = layerMask;
|
||||
|
||||
int exitCode = aKiway.ProcessJob( KIWAY::FACE_PCB, svgJob );
|
||||
|
||||
delete svgJob;
|
||||
int exitCode = aKiway.ProcessJob( KIWAY::FACE_PCB, svgJob.get() );
|
||||
|
||||
return exitCode;
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ public:
|
|||
m_plotFootprintValues( true ),
|
||||
m_plotRefDes( true ),
|
||||
m_plotGraphicItemsUsingContours( true ),
|
||||
m_pageSizeMode( 0 ),
|
||||
m_printMaskLayer()
|
||||
{
|
||||
}
|
||||
|
@ -58,4 +59,4 @@ public:
|
|||
LSET m_printMaskLayer;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue