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

Fix some compil warnings and Debug assertions.

parents 43167593 f76041e9
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -268,9 +268,9 @@ void STROKE_FONT::drawSingleLineText( const UTF8& aText )
            // If it is a double tilda, just process the second one
        }

        unsigned dd = *chIt - ' ';
        int dd = *chIt - ' ';

        if( dd >= m_glyphBoundingBoxes.size() || dd < 0 )
        if( dd >= (int) m_glyphBoundingBoxes.size() || dd < 0 )
            dd = '?' - ' ';

        GLYPH& glyph = m_glyphs[dd];
@@ -336,9 +336,9 @@ VECTOR2D STROKE_FONT::computeTextSize( const UTF8& aText ) const
        }

        // Index in the bounding boxes table
        unsigned dd = *it - ' ';
        int dd = *it - ' ';

        if( dd >= m_glyphBoundingBoxes.size() || dd < 0 )
        if( dd >= (int) m_glyphBoundingBoxes.size() || dd < 0 )
            dd = '?' - ' ';

        result.x += m_glyphSize.x * m_glyphBoundingBoxes[dd].GetEnd().x;
+4 −4
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ void COMPONENTS_LISTBOX::SetString( unsigned linecount, const wxString& text )
    if( linecount >= m_ComponentList.Count() )
        linecount = m_ComponentList.Count() - 1;

    if( linecount >= 0 )
    if( m_ComponentList.Count() > 0 )
        m_ComponentList[linecount] = text;
}

@@ -89,9 +89,9 @@ wxString COMPONENTS_LISTBOX::OnGetItemText( long item, long column ) const
}


void COMPONENTS_LISTBOX::SetSelection( unsigned index, bool State )
void COMPONENTS_LISTBOX::SetSelection( int index, bool State )
{
    if( (int) index >= GetCount() )
    if( index >= GetCount() )
        index = GetCount() - 1;

    if( (index >= 0) && (GetCount() > 0) )
@@ -164,7 +164,7 @@ void COMPONENTS_LISTBOX::OnChar( wxKeyEvent& event )

        if( key == start_char )
        {
            SetSelection( ii, true );   // Ensure visible
            SetSelection( (int) ii, true );   // Ensure visible
            break;
        }
    }
+2 −2
Original line number Diff line number Diff line
@@ -101,9 +101,9 @@ wxString FOOTPRINTS_LISTBOX::OnGetItemText( long item, long column ) const
}


void FOOTPRINTS_LISTBOX::SetSelection( unsigned index, bool State )
void FOOTPRINTS_LISTBOX::SetSelection( int index, bool State )
{
    if( (int) index >= GetCount() )
    if( index >= GetCount() )
        index = GetCount() - 1;

    if( (index >= 0)  && (GetCount() > 0) )
+2 −2
Original line number Diff line number Diff line
@@ -95,9 +95,9 @@ wxString LIBRARY_LISTBOX::OnGetItemText( long item, long column ) const
}


void LIBRARY_LISTBOX::SetSelection( unsigned index, bool State )
void LIBRARY_LISTBOX::SetSelection( int index, bool State )
{
    if( (int) index >= GetCount() )
    if( index >= GetCount() )
        index = GetCount() - 1;

    if( (index >= 0)  && (GetCount() > 0) )
+3 −3
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ public:
    ~FOOTPRINTS_LISTBOX();

    int      GetCount();
    void     SetSelection( unsigned index, bool State = true );
    void     SetSelection( int index, bool State = true );
    void     SetString( unsigned linecount, const wxString& text );
    void     AppendLine( const wxString& text );

@@ -127,7 +127,7 @@ public:
    ~LIBRARY_LISTBOX();

    int      GetCount();
    void     SetSelection( unsigned index, bool State = true );
    void     SetSelection( int index, bool State = true );
    void     SetString( unsigned linecount, const wxString& text );
    void     AppendLine( const wxString& text );
    void     SetLibraryList( const wxArrayString& aList );
@@ -187,7 +187,7 @@ public:
    /*
     * Enable or disable an item
     */
    void     SetSelection( unsigned index, bool State = true );
    void     SetSelection( int index, bool State = true );
    void     SetString( unsigned linecount, const wxString& text );
    void     AppendLine( const wxString& text );

Loading