diff --git a/common/eda_draw_frame.cpp b/common/eda_draw_frame.cpp index 143134816b..30fa8d4535 100644 --- a/common/eda_draw_frame.cpp +++ b/common/eda_draw_frame.cpp @@ -241,7 +241,8 @@ void EDA_DRAW_FRAME::OnUpdateSelectGrid( wxUpdateUIEvent& aEvent ) int idx = config()->m_Window.grid.last_size_idx; - if( idx >= 0 && idx < m_gridSelectBox->GetCount() && idx != m_gridSelectBox->GetSelection() ) + if( idx >= 0 && idx < int( m_gridSelectBox->GetCount() ) + && idx != m_gridSelectBox->GetSelection() ) m_gridSelectBox->SetSelection( idx ); } @@ -261,14 +262,14 @@ void EDA_DRAW_FRAME::OnSelectGrid( wxCommandEvent& event ) int idx = m_gridSelectBox->GetCurrentSelection(); - if( idx == m_gridSelectBox->GetCount() - 2 ) + if( idx == int( m_gridSelectBox->GetCount() ) - 2 ) { // wxWidgets will check the separator, which we don't want. // Re-check the current grid. wxUpdateUIEvent dummy; OnUpdateSelectGrid( dummy ); } - else if( idx == m_gridSelectBox->GetCount() - 1 ) + else if( idx == int( m_gridSelectBox->GetCount() ) - 1 ) { // wxWidgets will check the Grid Settings... entry, which we don't want. // Re-check the current grid. diff --git a/common/tool/common_tools.cpp b/common/tool/common_tools.cpp index b316452735..dabf9be4f0 100644 --- a/common/tool/common_tools.cpp +++ b/common/tool/common_tools.cpp @@ -2,6 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2014-2016 CERN + * Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors. * @author Maciej Suminski * * This program is free software; you can redistribute it and/or @@ -355,7 +356,7 @@ int COMMON_TOOLS::GridNext( const TOOL_EVENT& aEvent ) { int& currentGrid = m_toolMgr->GetSettings()->m_Window.grid.last_size_idx; - if( currentGrid + 1 < m_grids.size() ) + if( currentGrid + 1 < int( m_grids.size() ) ) currentGrid++; return OnGridChanged(); diff --git a/common/tool/grid_menu.cpp b/common/tool/grid_menu.cpp index a6e9a95ab0..79d2917f43 100644 --- a/common/tool/grid_menu.cpp +++ b/common/tool/grid_menu.cpp @@ -63,7 +63,7 @@ OPT_TOOL_EVENT GRID_MENU::eventHandler( const wxMenuEvent& aEvent ) void GRID_MENU::update() { APP_SETTINGS_BASE* settings = m_parent->config(); - int current = settings->m_Window.grid.last_size_idx; + unsigned int current = settings->m_Window.grid.last_size_idx; wxArrayString gridsList; BuildChoiceList( &gridsList, settings, m_parent->GetUserUnits() != EDA_UNITS::INCHES ); diff --git a/eeschema/dialogs/dialog_set_grid.cpp b/eeschema/dialogs/dialog_set_grid.cpp index 32bbb8c1f6..373ee595d3 100644 --- a/eeschema/dialogs/dialog_set_grid.cpp +++ b/eeschema/dialogs/dialog_set_grid.cpp @@ -60,7 +60,7 @@ bool DIALOG_SET_GRID::TransferDataToWindow() for( const wxString& grid : grids ) m_choiceGridSize->Append( grid ); - if( idx >= 0 && idx < m_choiceGridSize->GetCount() ) + if( idx >= 0 && idx < int( m_choiceGridSize->GetCount() ) ) m_choiceGridSize->SetSelection( idx ); return true;