Some coverity fixes
This commit is contained in:
parent
57fe3739ca
commit
b98cc0b937
|
@ -37,6 +37,7 @@
|
|||
C_OGL_3DMODEL::C_OGL_3DMODEL( const S3DMODEL &a3DModel,
|
||||
MATERIAL_MODE aMaterialMode )
|
||||
{
|
||||
m_ogl_idx_list_meshes = 0;
|
||||
m_ogl_idx_list_opaque = 0;
|
||||
m_ogl_idx_list_transparent = 0;
|
||||
m_nr_meshes = 0;
|
||||
|
|
|
@ -71,7 +71,7 @@ OPENGL_GAL::OPENGL_GAL( GAL_DISPLAY_OPTIONS& aDisplayOptions, wxWindow* aParent,
|
|||
HIDPI_GL_CANVAS( aParent, wxID_ANY, (int*) glAttributes, wxDefaultPosition, wxDefaultSize,
|
||||
wxEXPAND, aName ),
|
||||
mouseListener( aMouseListener ), paintListener( aPaintListener ), currentManager( nullptr ),
|
||||
cachedManager( nullptr ), nonCachedManager( nullptr ), overlayManager( nullptr )
|
||||
cachedManager( nullptr ), nonCachedManager( nullptr ), overlayManager( nullptr ), mainBuffer( 0 ), overlayBuffer( 0 )
|
||||
{
|
||||
if( glMainContext == NULL )
|
||||
{
|
||||
|
@ -1583,6 +1583,7 @@ int OPENGL_GAL::drawBitmapChar( unsigned long aChar )
|
|||
if( aChar == ' ' )
|
||||
{
|
||||
const FONT_GLYPH_TYPE* g = LookupGlyph( 'x' );
|
||||
wxASSERT( g );
|
||||
Translate( VECTOR2D( g->advance, 0 ) );
|
||||
return g->advance;
|
||||
}
|
||||
|
|
|
@ -107,7 +107,8 @@ CMP_TREE_NODE::CMP_TREE_NODE()
|
|||
Type( INVALID ),
|
||||
IntrinsicRank( 0 ),
|
||||
Score( kLowestDefaultScore ),
|
||||
Unit( 0 )
|
||||
Unit( 0 ),
|
||||
IsRoot( false )
|
||||
{}
|
||||
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
|
||||
LIB_MANAGER::LIB_MANAGER( LIB_EDIT_FRAME& aFrame )
|
||||
: m_frame( aFrame ), m_symbolTable( aFrame.Prj().SchSymbolLibTable() )
|
||||
: m_frame( aFrame ), m_symbolTable( aFrame.Prj().SchSymbolLibTable() ), m_syncHash( 0 )
|
||||
{
|
||||
m_adapter = LIB_MANAGER_ADAPTER::Create( this );
|
||||
m_adapter->ShowUnits( false );
|
||||
|
|
|
@ -1462,6 +1462,7 @@ bool SCH_SCREENS::HasNoFullyDefinedLibIds()
|
|||
|
||||
cnt += 1;
|
||||
symbol = dynamic_cast< SCH_COMPONENT* >( item );
|
||||
wxASSERT( symbol );
|
||||
|
||||
if( !symbol->GetLibId().GetLibNickname().empty() )
|
||||
return false;
|
||||
|
@ -1493,6 +1494,7 @@ size_t SCH_SCREENS::GetLibNicknames( wxArrayString& aLibNicknames )
|
|||
continue;
|
||||
|
||||
symbol = dynamic_cast< SCH_COMPONENT* >( item );
|
||||
wxASSERT( symbol );
|
||||
|
||||
nickname = symbol->GetLibId().GetLibNickname();
|
||||
|
||||
|
@ -1523,6 +1525,7 @@ int SCH_SCREENS::ChangeSymbolLibNickname( const wxString& aFrom, const wxString&
|
|||
continue;
|
||||
|
||||
symbol = dynamic_cast< SCH_COMPONENT* >( item );
|
||||
wxASSERT( symbol );
|
||||
|
||||
if( symbol->GetLibId().GetLibNickname() != aFrom )
|
||||
continue;
|
||||
|
|
|
@ -905,8 +905,7 @@ void SIM_PLOT_FRAME::menuShowGridUpdate( wxUpdateUIEvent& event )
|
|||
{
|
||||
SIM_PLOT_PANEL* plot = CurrentPlot();
|
||||
|
||||
if( plot )
|
||||
event.Check( plot ? plot->IsGridShown() : false );
|
||||
event.Check( plot ? plot->IsGridShown() : false );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -383,7 +383,7 @@ void GERBVIEW_PAINTER::draw( /*const*/ GERBER_DRAW_ITEM* aItem, int aLayer )
|
|||
|
||||
|
||||
void GERBVIEW_PAINTER::drawPolygon( GERBER_DRAW_ITEM* aParent,
|
||||
SHAPE_POLY_SET aPolygon,
|
||||
SHAPE_POLY_SET& aPolygon,
|
||||
bool aFilled )
|
||||
{
|
||||
for( auto it = aPolygon.Iterate( 0 ); it; ++it )
|
||||
|
|
|
@ -181,7 +181,7 @@ protected:
|
|||
void draw( /*const*/ GERBER_DRAW_ITEM* aVia, int aLayer );
|
||||
|
||||
/// Helper routine to draw a polygon
|
||||
void drawPolygon( GERBER_DRAW_ITEM* aParent, SHAPE_POLY_SET aPolygon, bool aFilled );
|
||||
void drawPolygon( GERBER_DRAW_ITEM* aParent, SHAPE_POLY_SET& aPolygon, bool aFilled );
|
||||
|
||||
/// Helper to draw a flashed shape (aka spot)
|
||||
void drawFlashedShape( GERBER_DRAW_ITEM* aItem, bool aFilled );
|
||||
|
|
|
@ -55,6 +55,8 @@ public:
|
|||
m_Size( aSize )
|
||||
{ }
|
||||
|
||||
virtual ~EDA_RECT() { };
|
||||
|
||||
wxPoint Centre() const
|
||||
{
|
||||
return wxPoint( m_Pos.x + ( m_Size.x >> 1 ),
|
||||
|
|
|
@ -199,7 +199,8 @@ public:
|
|||
* construct a default OPTIONAL_XML_ATTRIBUTE, whose data is not available.
|
||||
*/
|
||||
OPTIONAL_XML_ATTRIBUTE() :
|
||||
m_isAvailable( false )
|
||||
m_isAvailable( false ),
|
||||
m_data( T() )
|
||||
{}
|
||||
|
||||
/**
|
||||
|
|
|
@ -135,7 +135,7 @@ private:
|
|||
/*
|
||||
* construction parameters
|
||||
*/
|
||||
bool m_angleSnap;
|
||||
bool m_angleSnap = false;
|
||||
};
|
||||
} // PREVIEW
|
||||
} // KIGFX
|
||||
|
|
|
@ -136,7 +136,8 @@ public:
|
|||
m_running( false ),
|
||||
m_args( 0 ),
|
||||
m_callee( nullptr ),
|
||||
m_retVal( 0 )
|
||||
m_retVal( 0 ),
|
||||
m_callContext( nullptr )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
CONNECTIVITY_DATA::CONNECTIVITY_DATA()
|
||||
{
|
||||
m_connAlgo.reset( new CN_CONNECTIVITY_ALGO );
|
||||
m_progressReporter = nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -244,7 +244,7 @@ size_t FOOTPRINT_LIST_IMPL::CountFinished()
|
|||
}
|
||||
|
||||
|
||||
FOOTPRINT_LIST_IMPL::FOOTPRINT_LIST_IMPL() : m_loader( nullptr )
|
||||
FOOTPRINT_LIST_IMPL::FOOTPRINT_LIST_IMPL() : m_loader( nullptr ), m_first_to_finish( false ), m_count_finished( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -60,6 +60,7 @@ DXF2BRD_CONVERTER::DXF2BRD_CONVERTER() : DRW_Interface()
|
|||
m_yOffset = 0.0; // Y coord offset for conversion (in mm)
|
||||
m_DXF2mm = 1.0; // The scale factor to convert DXF units to mm
|
||||
m_version = 0; // the dxf version, not yet used
|
||||
m_defaultThickness = 0.2; // default thickness (in mm)
|
||||
m_brdLayer = Dwgs_User; // The default import layer
|
||||
m_importAsfootprintGraphicItems = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue