From 0a308c45848853203f4e0309eb59b10e97f07448 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 11 May 2019 11:12:39 +0200 Subject: [PATCH] Fix minor compil warnings --- eeschema/lib_polyline.cpp | 2 +- eeschema/sch_legacy_plugin.cpp | 2 +- eeschema/tools/ee_point_editor.cpp | 4 ++-- eeschema/tools/ee_point_editor.h | 2 +- eeschema/tools/sch_editor_control.cpp | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eeschema/lib_polyline.cpp b/eeschema/lib_polyline.cpp index 93371dfc02..6fe4caeab4 100644 --- a/eeschema/lib_polyline.cpp +++ b/eeschema/lib_polyline.cpp @@ -182,7 +182,7 @@ void LIB_POLYLINE::AddCorner( const wxPoint& aPosition ) int currentMinDistance = INT_MAX; int closestLineStart = 0; - for( int i = 0; i < m_PolyPoints.size() - 1; ++i ) + for( unsigned i = 0; i < m_PolyPoints.size() - 1; ++i ) { int distance = (int) DistanceLinePoint( m_PolyPoints[i], m_PolyPoints[i + 1], aPosition ); diff --git a/eeschema/sch_legacy_plugin.cpp b/eeschema/sch_legacy_plugin.cpp index 3f227bf6fa..2ab9956d0b 100644 --- a/eeschema/sch_legacy_plugin.cpp +++ b/eeschema/sch_legacy_plugin.cpp @@ -1879,7 +1879,7 @@ void SCH_LEGACY_PLUGIN::Format( SELECTION* aSelection, OUTPUTFORMATTER* aFormatt { m_out = aFormatter; - for( int i = 0; i < aSelection->GetSize(); ++i ) + for( unsigned i = 0; i < aSelection->GetSize(); ++i ) { SCH_ITEM* item = (SCH_ITEM*) aSelection->GetItem( i ); diff --git a/eeschema/tools/ee_point_editor.cpp b/eeschema/tools/ee_point_editor.cpp index 66bcc6c355..2cbe47250a 100644 --- a/eeschema/tools/ee_point_editor.cpp +++ b/eeschema/tools/ee_point_editor.cpp @@ -454,7 +454,7 @@ void EE_POINT_EDITOR::updateItem() const lines->ClearPoints(); - for( int i = 0; i < m_editPoints->PointsSize(); ++i ) + for( unsigned i = 0; i < m_editPoints->PointsSize(); ++i ) lines->AddPoint( mapCoords( m_editPoints->Point( i ).GetPosition() ) ); break; @@ -661,7 +661,7 @@ bool EE_POINT_EDITOR::removeCornerCondition( const SELECTION& ) const std::vector& pts = polyLine->GetPolyPoints(); - for( int i = 0; i < polyLine->GetCornerCount(); ++i ) + for( unsigned i = 0; i < polyLine->GetCornerCount(); ++i ) { if( pts[i] == mapCoords( m_editedPoint->GetPosition() ) ) return true; diff --git a/eeschema/tools/ee_point_editor.h b/eeschema/tools/ee_point_editor.h index 78425e708b..40656e17bb 100644 --- a/eeschema/tools/ee_point_editor.h +++ b/eeschema/tools/ee_point_editor.h @@ -73,7 +73,7 @@ private: inline int getEditedPointIndex() const { - for( int i = 0; i < m_editPoints->PointsSize(); ++i ) + for( unsigned i = 0; i < m_editPoints->PointsSize(); ++i ) { if( m_editedPoint == &m_editPoints->Point( i ) ) return i; diff --git a/eeschema/tools/sch_editor_control.cpp b/eeschema/tools/sch_editor_control.cpp index 21edd01b6d..447f12b8dc 100644 --- a/eeschema/tools/sch_editor_control.cpp +++ b/eeschema/tools/sch_editor_control.cpp @@ -612,7 +612,7 @@ int SCH_EDITOR_CONTROL::Paste( const TOOL_EVENT& aEvent ) SYMBOL_LIB_TABLE* symLibTable = m_frame->Prj().SchSymbolLibTable(); PART_LIB* partLib = m_frame->Prj().SchLibs()->GetCacheLibrary(); - for( int i = 0; i < loadedItems.size(); ++i ) + for( unsigned i = 0; i < loadedItems.size(); ++i ) { EDA_ITEM* item = loadedItems[i];