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:
+1
-1
@@ -985,7 +985,7 @@ void ClipAndDrawPoly( EDA_RECT* aClipBox, wxDC* aDC, wxPoint aPoints[], int n )
|
||||
|
||||
for( cpointIterator cit = outputPolygon.begin(); cit != outputPolygon.end(); ++cit )
|
||||
{
|
||||
clippedPolygon.push_back( wxPoint( KiROUND( cit->X ), KiROUND( cit->Y ) ) );
|
||||
clippedPolygon.emplace_back( KiROUND( cit->X ), KiROUND( cit->Y ) );
|
||||
}
|
||||
|
||||
if( clippedPolygon.size() )
|
||||
|
||||
Reference in New Issue
Block a user