Minor Coverity and compil warnings fix.
This commit is contained in:
parent
5ce22d9673
commit
893a362d9e
|
@ -1609,7 +1609,7 @@ size_t SCH_SCREEN::getLibSymbolNameMatches( const SCH_SYMBOL& aSymbol,
|
||||||
long tmp;
|
long tmp;
|
||||||
wxString suffix;
|
wxString suffix;
|
||||||
|
|
||||||
for( auto pair : m_libSymbols )
|
for( auto& pair : m_libSymbols )
|
||||||
{
|
{
|
||||||
if( pair.first.StartsWith( searchName, &suffix ) && suffix.ToLong( &tmp ) )
|
if( pair.first.StartsWith( searchName, &suffix ) && suffix.ToLong( &tmp ) )
|
||||||
aMatches.emplace_back( pair.first );
|
aMatches.emplace_back( pair.first );
|
||||||
|
|
|
@ -499,7 +499,7 @@ bool SHAPE_POLY_SET::IsPolygonSelfIntersecting( int aPolygonIndex ) const
|
||||||
break;
|
break;
|
||||||
|
|
||||||
int index_diff = std::abs( firstSegment.Index() - secondSegment.Index() );
|
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.
|
// Check whether the two segments built collide, only when they are not adjacent.
|
||||||
if( !adjacent && firstSegment.Collide( secondSegment, 0 ) )
|
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
|
// http://www.angusj.com/delphi/clipper/documentation/Docs/Units/ClipperLib/Types/JoinType.htm
|
||||||
JoinType joinType = JoinType::Round; // The way corners are offsetted
|
JoinType joinType = JoinType::Round; // The way corners are offsetted
|
||||||
double miterLimit = 2.0; // Smaller value when using jtMiter for joinType
|
double miterLimit = 2.0; // Smaller value when using jtMiter for joinType
|
||||||
JoinType miterFallback = JoinType::Square;
|
|
||||||
|
|
||||||
switch( aCornerStrategy )
|
switch( aCornerStrategy )
|
||||||
{
|
{
|
||||||
|
|
|
@ -816,7 +816,7 @@ void ROUTER::GetUpdatedItems( std::vector<PNS::ITEM*>& aRemoved, std::vector<PNS
|
||||||
|
|
||||||
node->GetUpdatedItems( aRemoved, aAdded );
|
node->GetUpdatedItems( aRemoved, aAdded );
|
||||||
|
|
||||||
for( auto item : current.CItems() )
|
for( auto& item : current.CItems() )
|
||||||
{
|
{
|
||||||
aHeads.push_back( item.item->Clone() );
|
aHeads.push_back( item.item->Clone() );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue