Minor speed cleanup
This adjusts iterators to use const reference when only used for copy. It also ensures pre-allocation of vectors when size is known ahead of time.
This commit is contained in:
@@ -206,6 +206,7 @@ void PSLIKE_PLOTTER::FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aS
|
||||
std::vector< wxPoint > cornerList;
|
||||
// TransformRoundRectToPolygon creates only one convex polygon
|
||||
SHAPE_LINE_CHAIN& poly = outline.Outline( 0 );
|
||||
cornerList.reserve( poly.PointCount() );
|
||||
|
||||
for( int ii = 0; ii < poly.PointCount(); ++ii )
|
||||
cornerList.emplace_back( poly.Point( ii ).x, poly.Point( ii ).y );
|
||||
|
||||
Reference in New Issue
Block a user