Fix a few (minor) compil warnings.
This commit is contained in:
parent
331176744c
commit
b3aa8a0c49
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -250,8 +250,8 @@ void PANEL_SETUP_PINMAP::changeErrorLevel( wxCommandEvent& event )
|
|||
{
|
||||
int id = event.GetId();
|
||||
int ii = id - ID_MATRIX_0;
|
||||
int x = ii / ELECTRICAL_PINTYPES_TOTAL;
|
||||
int y = ii % ELECTRICAL_PINTYPES_TOTAL;
|
||||
ELECTRICAL_PINTYPE x = static_cast<ELECTRICAL_PINTYPE>( ii / ELECTRICAL_PINTYPES_TOTAL );
|
||||
ELECTRICAL_PINTYPE y = static_cast<ELECTRICAL_PINTYPE>( ii % ELECTRICAL_PINTYPES_TOTAL );
|
||||
wxWindow* butt = static_cast<wxWindow*>( event.GetEventObject() );
|
||||
|
||||
int level = static_cast<int>( m_schematic->ErcSettings().GetPinMapValue( y, x ) );
|
||||
|
|
|
@ -48,7 +48,7 @@ public:
|
|||
|
||||
wxString GetResultCell( int aRow, int aCol ) override
|
||||
{
|
||||
if( aRow >= m_hitlist.size() )
|
||||
if( aRow >= static_cast<int>( m_hitlist.size() ) )
|
||||
return wxEmptyString;
|
||||
|
||||
const SCH_SEARCH_HIT& hit = m_hitlist[aRow];
|
||||
|
|
|
@ -1063,7 +1063,7 @@ bool FOOTPRINT_VIEWER_FRAME::ShowModal( wxString* aFootprint, wxWindow* aParent
|
|||
if( fpid.IsValid() )
|
||||
{
|
||||
wxString libraryName = fpid.GetLibNickname();
|
||||
wxHyperlinkCtrl* button;
|
||||
wxHyperlinkCtrl* button = nullptr;
|
||||
|
||||
if( !fpTable->HasLibrary( fpid.GetLibNickname(), false )
|
||||
|| !fpTable->HasLibrary( fpid.GetLibNickname(), true ) )
|
||||
|
@ -1073,12 +1073,12 @@ bool FOOTPRINT_VIEWER_FRAME::ShowModal( wxString* aFootprint, wxWindow* aParent
|
|||
if( WX_INFOBAR* infobar = GetInfoBar() )
|
||||
{
|
||||
button = new wxHyperlinkCtrl( infobar, wxID_ANY,
|
||||
_( "Manage symol libraries" ),
|
||||
_( "Manage symol libraries" ),
|
||||
wxEmptyString );
|
||||
button->Bind( wxEVT_COMMAND_HYPERLINK, std::function<void( wxHyperlinkEvent & aEvent )>(
|
||||
[=]( wxHyperlinkEvent& aEvent )
|
||||
{
|
||||
InvokePcbLibTableEditor( &Kiway(), this );
|
||||
InvokePcbLibTableEditor( &Kiway(), this );
|
||||
} ) );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ public:
|
|||
|
||||
wxString GetResultCell( int aRow, int aCol ) override
|
||||
{
|
||||
if( aRow >= m_hitlist.size() )
|
||||
if( aRow >= static_cast<int>(m_hitlist.size() ) )
|
||||
return wxEmptyString;
|
||||
|
||||
BOARD_ITEM* item = m_hitlist[aRow];
|
||||
|
|
Loading…
Reference in New Issue