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:
@@ -962,10 +962,7 @@ void GERBER_PLOTTER::FlashPadTrapez( const wxPoint& aPadPos, const wxPoint* aCo
|
||||
// TODO: use Aperture macro and flash it
|
||||
|
||||
// polygon corners list
|
||||
std::vector< wxPoint > cornerList;
|
||||
|
||||
for( int ii = 0; ii < 4; ii++ )
|
||||
cornerList.push_back( aCorners[ii] );
|
||||
std::vector<wxPoint> cornerList = { aCorners[0], aCorners[1], aCorners[2], aCorners[3] };
|
||||
|
||||
// Draw the polygon and fill the interior as required
|
||||
for( unsigned ii = 0; ii < 4; ii++ )
|
||||
|
||||
Reference in New Issue
Block a user