Commit 4bab8dde authored by jean-pierre charras's avatar jean-pierre charras
Browse files

Fix some minor coverity warnings. Fix a bug in pcad2kicad plugin. Scripting:...

Fix some minor coverity warnings. Fix a bug in pcad2kicad plugin. Scripting: map BASE_SET. Rename some python bom scripts with better names. Fix erroneous comments and add comments
parent 25b9a42e
Loading
Loading
Loading
Loading
+10 −7
Original line number Diff line number Diff line
@@ -227,7 +227,9 @@ static void DrawGraphicTextPline( EDA_RECT* aClipBox,
                       coord[ik + 1].x, coord[ik + 1].y );
        }
    }
    else if( aSketchMode )
    else if( aDC )
    {
        if( aSketchMode )
        {
            for( int ik = 0; ik < (point_count - 1); ik++ )
                GRCSegm( aClipBox, aDC, coord[ik].x, coord[ik].y,
@@ -237,6 +239,7 @@ static void DrawGraphicTextPline( EDA_RECT* aClipBox,
            GRPoly( aClipBox, aDC, point_count, coord, 0,
                    aWidth, aColor, aColor );
    }
}


/**
+1 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ KIWAY_PLAYER::KIWAY_PLAYER( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType
    m_modal_loop( 0 ), m_modal_resultant_parent( 0 )
{
    // DBG( printf("KIWAY_EXPRESS::wxEVENT_ID:%d\n", KIWAY_EXPRESS::wxEVENT_ID );)
    m_modal_ret_val = 0;
}


+1 −1
Original line number Diff line number Diff line
@@ -258,7 +258,7 @@ void DIALOG_EESCHEMA_OPTIONS::OnDeleteButtonClick( wxCommandEvent& event )
        // If the selectedField is still not in the templateField range now,
        // make sure we stay in range and when there are no fields present
        // move to -1
        if( selectedField >= templateFields.size() )
        if( selectedField >= int( templateFields.size() ) )
            selectedField = templateFields.size() - 1;

        // Update the display to reflect the new data
+3 −3
Original line number Diff line number Diff line
@@ -44,13 +44,13 @@ protected:
     * edit panel
     * selectedField = -1 when no valid item selected
     */
    size_t selectedField;
    int selectedField;

    /** @brief return true if aFieldId is a valid field selection
     */
    bool fieldSelectionValid( size_t aFieldId )
    bool fieldSelectionValid( int aFieldId )
    {
        return ( aFieldId >= 0 ) && ( aFieldId < templateFields.size() );
        return ( aFieldId >= 0 ) && ( aFieldId < int( templateFields.size() ) );
    }

    /**
+2 −1
Original line number Diff line number Diff line
@@ -116,7 +116,8 @@ SCH_TEXT* SCH_EDIT_FRAME::CreateNewText( wxDC* aDC, int aType )
    lastTextItalic = textItem->IsItalic();
    lastTextOrientation = textItem->GetOrientation();

    if( (aType == SCH_GLOBAL_LABEL_T) || (aType == SCH_HIERARCHICAL_LABEL_T) )
    if( ( textItem->Type() == SCH_GLOBAL_LABEL_T ) ||
        ( textItem->Type() == SCH_HIERARCHICAL_LABEL_T ) )
    {
        lastGlobalLabelShape = textItem->GetShape();
    }
Loading