Browse Source

Fix minor compil and Coverity warnings.

7.0
jean-pierre charras 3 years ago
parent
commit
0604d7b813
  1. 3
      eeschema/ee_collectors.h
  2. 12
      eeschema/tools/sch_edit_tool.cpp
  3. 2
      pcbnew/pcb_bitmap.cpp

3
eeschema/ee_collectors.h

@ -49,7 +49,8 @@ public:
EE_COLLECTOR( const KICAD_T* aScanTypes = EE_COLLECTOR::AllItems ) :
m_Unit( 0 ),
m_Convert( 0 )
m_Convert( 0 ),
m_ShowPinElectricalTypes( false )
{
SetScanTypes( aScanTypes );
}

12
eeschema/tools/sch_edit_tool.cpp

@ -1886,14 +1886,14 @@ int SCH_EDIT_TOOL::ChangeTextType( const TOOL_EVENT& aEvent )
auto prepareForNetName =
[]( wxString& aText )
{
wxString txt = aText;
txt.Replace( "\n", "_" );
txt.Replace( "\r", "_" );
txt.Replace( "\t", "_" );
txt.Replace( " ", "_" );
wxString local_txt = aText;
local_txt.Replace( "\n", "_" );
local_txt.Replace( "\r", "_" );
local_txt.Replace( "\t", "_" );
local_txt.Replace( " ", "_" );
// label strings are "escaped" i.e. a '/' is replaced by "{slash}"
return EscapeString( txt, CTX_NETNAME );
return EscapeString( local_txt, CTX_NETNAME );
};
switch( convertTo )

2
pcbnew/pcb_bitmap.cpp

@ -76,7 +76,7 @@ PCB_BITMAP& PCB_BITMAP::operator=( const BOARD_ITEM& aItem )
delete m_image;
m_image = new BITMAP_BASE( *bitmap->m_image );
m_pos = bitmap->m_pos;
m_image->SetPixelSizeIu( Mils2iu( 1000 ) / m_image->GetPPI() );
m_image->SetPixelSizeIu( (float) Mils2iu( 1000 ) / m_image->GetPPI() );
}
return *this;

Loading…
Cancel
Save