Minor Coverity and compil warnings fix.

This commit is contained in:
jean-pierre charras 2023-03-15 20:09:04 +01:00
parent 5ce22d9673
commit 893a362d9e
3 changed files with 3 additions and 4 deletions

View File

@ -1609,7 +1609,7 @@ size_t SCH_SCREEN::getLibSymbolNameMatches( const SCH_SYMBOL& aSymbol,
long tmp;
wxString suffix;
for( auto pair : m_libSymbols )
for( auto& pair : m_libSymbols )
{
if( pair.first.StartsWith( searchName, &suffix ) && suffix.ToLong( &tmp ) )
aMatches.emplace_back( pair.first );

View File

@ -499,7 +499,7 @@ bool SHAPE_POLY_SET::IsPolygonSelfIntersecting( int aPolygonIndex ) const
break;
int index_diff = std::abs( firstSegment.Index() - secondSegment.Index() );
bool adjacent = ( index_diff == 1) || (index_diff == (segments.size() - 1) );
bool adjacent = ( index_diff == 1) || (index_diff == ((int)segments.size() - 1) );
// Check whether the two segments built collide, only when they are not adjacent.
if( !adjacent && firstSegment.Collide( secondSegment, 0 ) )
@ -1008,7 +1008,6 @@ void SHAPE_POLY_SET::inflate2( int aAmount, int aCircleSegCount, CORNER_STRATEGY
// http://www.angusj.com/delphi/clipper/documentation/Docs/Units/ClipperLib/Types/JoinType.htm
JoinType joinType = JoinType::Round; // The way corners are offsetted
double miterLimit = 2.0; // Smaller value when using jtMiter for joinType
JoinType miterFallback = JoinType::Square;
switch( aCornerStrategy )
{

View File

@ -816,7 +816,7 @@ void ROUTER::GetUpdatedItems( std::vector<PNS::ITEM*>& aRemoved, std::vector<PNS
node->GetUpdatedItems( aRemoved, aAdded );
for( auto item : current.CItems() )
for( auto& item : current.CItems() )
{
aHeads.push_back( item.item->Clone() );
}