From 8dabcc012539a88a14a13da403da5026d7cf6437 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 14 Nov 2017 15:05:35 +0100 Subject: [PATCH] Fixed signed vs unsigned integer comparisons --- eeschema/lib_manager.cpp | 6 +++--- eeschema/libedit.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/eeschema/lib_manager.cpp b/eeschema/lib_manager.cpp index c44bcd3fdd..169fed0f06 100644 --- a/eeschema/lib_manager.cpp +++ b/eeschema/lib_manager.cpp @@ -283,7 +283,7 @@ std::list LIB_MANAGER::GetAliases( const wxString& aLibrary ) const { for( auto& partBuf : libIt->second.GetBuffers() ) { - for( int i = 0; i < partBuf->GetPart()->GetAliasCount(); ++i ) + for( unsigned int i = 0; i < partBuf->GetPart()->GetAliasCount(); ++i ) ret.push_back( partBuf->GetPart()->GetAlias( i ) ); } } @@ -719,7 +719,7 @@ bool LIB_MANAGER::LIB_BUFFER::addAliases( PART_BUFFER::PTR aPartBuf ) wxCHECK( part, false ); bool ret = true; // Assume everything is ok - for( int i = 0; i < part->GetAliasCount(); ++i ) + for( unsigned int i = 0; i < part->GetAliasCount(); ++i ) { bool newAlias; std::tie( std::ignore, newAlias ) = m_aliases.emplace( part->GetAlias( i )->GetName(), aPartBuf ); @@ -741,7 +741,7 @@ bool LIB_MANAGER::LIB_BUFFER::removeAliases( PART_BUFFER::PTR aPartBuf ) wxCHECK( part, false ); bool ret = true; // Assume everything is ok - for( int i = 0; i < part->GetAliasCount(); ++i ) + for( unsigned int i = 0; i < part->GetAliasCount(); ++i ) { auto aliasIt = m_aliases.find( part->GetAlias( i )->GetName() ); diff --git a/eeschema/libedit.cpp b/eeschema/libedit.cpp index 3eb4906012..ee779a7bdd 100644 --- a/eeschema/libedit.cpp +++ b/eeschema/libedit.cpp @@ -432,7 +432,7 @@ void LIB_EDIT_FRAME::fixDuplicateAliases( LIB_PART* aPart, const wxString& aLibr { wxString newName; - for( int i = 0; i < aPart->GetAliasCount(); ++i ) + for( unsigned int i = 0; i < aPart->GetAliasCount(); ++i ) { LIB_ALIAS* alias = aPart->GetAlias( i ); int sfx = 0;