Fix a compil and Coverity warnings
This commit is contained in:
parent
4f7e9bead5
commit
27072e52f7
|
@ -548,11 +548,11 @@ void CAIRO_GAL_BASE::DrawBitmap( const BITMAP_BASE& aBitmap, double alphaBlend )
|
|||
a = bm_pix_buffer.GetAlpha( col, row );
|
||||
|
||||
// ARGB32 format needs pre-multiplied alpha
|
||||
r = int32_t( r ) * a / 0xFF;
|
||||
g = int32_t( g ) * a / 0xFF;
|
||||
b = int32_t( b ) * a / 0xFF;
|
||||
r = uint32_t( r ) * a / 0xFF;
|
||||
g = uint32_t( g ) * a / 0xFF;
|
||||
b = uint32_t( b ) * a / 0xFF;
|
||||
}
|
||||
else if( bm_pix_buffer.HasMask() && ( r << 16 | g << 8 | b ) == mask_color )
|
||||
else if( bm_pix_buffer.HasMask() && (uint32_t)( r << 16 | g << 8 | b ) == mask_color )
|
||||
{
|
||||
a = wxALPHA_TRANSPARENT;
|
||||
}
|
||||
|
|
|
@ -609,7 +609,7 @@ wxString NETLIST_EXPORTER_ALLEGRO::formatFunction( wxString aName, LIB_PINS aPin
|
|||
|
||||
out_str.Printf( wxT( "PINORDER %s " ), TO_UTF8( aName ) );
|
||||
|
||||
for( auto pinName : pinNameList )
|
||||
for( wxString& pinName : pinNameList )
|
||||
{
|
||||
str.Printf( ",\n\t%s", TO_UTF8( pinName ) );
|
||||
out_str += str;
|
||||
|
|
|
@ -1203,7 +1203,6 @@ bool PCB_CONTROL::placeBoardItems( BOARD_COMMIT* aCommit, std::vector<BOARD_ITEM
|
|||
int PCB_CONTROL::AppendBoard( PLUGIN& pi, wxString& fileName )
|
||||
{
|
||||
PCB_EDIT_FRAME* editFrame = dynamic_cast<PCB_EDIT_FRAME*>( m_frame );
|
||||
BOARD_COMMIT commit( editFrame );
|
||||
|
||||
if( !editFrame )
|
||||
return 1;
|
||||
|
@ -1213,6 +1212,8 @@ int PCB_CONTROL::AppendBoard( PLUGIN& pi, wxString& fileName )
|
|||
if( !brd )
|
||||
return 1;
|
||||
|
||||
BOARD_COMMIT commit( editFrame );
|
||||
|
||||
// Mark existing items, in order to know what are the new items so we can select only
|
||||
// the new items after loading
|
||||
for( PCB_TRACK* track : brd->Tracks() )
|
||||
|
|
Loading…
Reference in New Issue