Cleanup: Replace push_back with emplace_back
In cases where we create a new item and immediately push into a container, the emplace idiom is faster and more efficient.
This commit is contained in:
@@ -126,8 +126,8 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
|
||||
SHAPE_LINE_CHAIN& outline = poly->GetPolygons().Outline( idx );
|
||||
|
||||
for( int ii = 0; ii < outline.PointCount(); ii++ )
|
||||
points.push_back( wxPoint( outline.Point( ii ).x ,
|
||||
outline.Point( ii ).y ) );
|
||||
points.emplace_back( outline.Point( ii ).x ,
|
||||
outline.Point( ii ).y );
|
||||
|
||||
plotter->PlotPoly( points, FILLED_SHAPE, poly->GetPenWidth() );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user