fix a few Coverity warnings.
This commit is contained in:
parent
4e96f9990d
commit
b8c621a991
|
@ -288,6 +288,8 @@ PGM_BASE::PGM_BASE()
|
||||||
m_pgm_checker = NULL;
|
m_pgm_checker = NULL;
|
||||||
m_locale = NULL;
|
m_locale = NULL;
|
||||||
m_common_settings = NULL;
|
m_common_settings = NULL;
|
||||||
|
m_iconsScale = 1.0;
|
||||||
|
m_useIconsInMenus = true; // will be set later after reading the config
|
||||||
|
|
||||||
m_show_env_var_dialog = true;
|
m_show_env_var_dialog = true;
|
||||||
|
|
||||||
|
|
|
@ -72,11 +72,7 @@ private:
|
||||||
{
|
{
|
||||||
std::size_t operator()( const SEG& a ) const
|
std::size_t operator()( const SEG& a ) const
|
||||||
{
|
{
|
||||||
std::size_t seed = 0;
|
|
||||||
|
|
||||||
return a.A.x + a.B.x + a.A.y + a.B.y;
|
return a.A.x + a.B.x + a.A.y + a.B.y;
|
||||||
|
|
||||||
return seed;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -448,7 +448,7 @@ VECTOR2<T> VECTOR2<T>::operator-()
|
||||||
template <class T>
|
template <class T>
|
||||||
typename VECTOR2<T>::extended_type VECTOR2<T>::operator*( const VECTOR2<T>& aVector ) const
|
typename VECTOR2<T>::extended_type VECTOR2<T>::operator*( const VECTOR2<T>& aVector ) const
|
||||||
{
|
{
|
||||||
return aVector.x * x + aVector.y * y;
|
return (extended_type)aVector.x * x + (extended_type)aVector.y * y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
BOARD_CONNECTED_ITEM::BOARD_CONNECTED_ITEM( BOARD_ITEM* aParent, KICAD_T idtype ) :
|
BOARD_CONNECTED_ITEM::BOARD_CONNECTED_ITEM( BOARD_ITEM* aParent, KICAD_T idtype ) :
|
||||||
BOARD_ITEM( aParent, idtype ), m_netinfo( &NETINFO_LIST::ORPHANED_ITEM )
|
BOARD_ITEM( aParent, idtype ), m_netinfo( &NETINFO_LIST::ORPHANED_ITEM )
|
||||||
{
|
{
|
||||||
|
m_localRatsnestVisible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -387,7 +387,6 @@ void ZONE_CONTAINER::DrawWhileCreateOutline( EDA_DRAW_PANEL* panel, wxDC* DC,
|
||||||
return;
|
return;
|
||||||
|
|
||||||
PCB_LAYER_ID curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer;
|
PCB_LAYER_ID curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer;
|
||||||
BOARD* brd = GetBoard();
|
|
||||||
|
|
||||||
auto frame = static_cast<PCB_BASE_FRAME*> ( panel->GetParent() );
|
auto frame = static_cast<PCB_BASE_FRAME*> ( panel->GetParent() );
|
||||||
auto color = frame->Settings().Colors().GetLayerColor( m_Layer );
|
auto color = frame->Settings().Colors().GetLayerColor( m_Layer );
|
||||||
|
|
|
@ -244,14 +244,13 @@ static int BuildCornersList_S_Shape( std::vector <wxPoint>& aBuffer,
|
||||||
centre = pt;
|
centre = pt;
|
||||||
centre.y += radius;
|
centre.y += radius;
|
||||||
gen_arc( aBuffer, pt, centre, 900 * sign );
|
gen_arc( aBuffer, pt, centre, 900 * sign );
|
||||||
aBuffer.back();
|
|
||||||
|
|
||||||
// Rotate point
|
// Rotate point
|
||||||
angle += 900;
|
angle += 900;
|
||||||
|
|
||||||
for( unsigned jj = 0; jj < aBuffer.size(); jj++ )
|
for( unsigned jj = 0; jj < aBuffer.size(); jj++ )
|
||||||
{
|
{
|
||||||
RotatePoint( &aBuffer[jj].x, &aBuffer[jj].y, aStartPoint.x, aStartPoint.y, angle );
|
RotatePoint( &aBuffer[jj], aStartPoint, angle );
|
||||||
}
|
}
|
||||||
|
|
||||||
// push last point (end point)
|
// push last point (end point)
|
||||||
|
|
|
@ -59,6 +59,7 @@ POSITION_RELATIVE_TOOL::POSITION_RELATIVE_TOOL() :
|
||||||
PCB_TOOL( "pcbnew.PositionRelative" ), m_position_relative_dialog( NULL ),
|
PCB_TOOL( "pcbnew.PositionRelative" ), m_position_relative_dialog( NULL ),
|
||||||
m_selectionTool( NULL ), m_anchor_item( NULL )
|
m_selectionTool( NULL ), m_anchor_item( NULL )
|
||||||
{
|
{
|
||||||
|
m_position_relative_rotation = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue