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:
@@ -62,7 +62,7 @@ void BASIC_GAL::DrawPolyline( const std::deque<VECTOR2D>& aPointList )
|
||||
for( ; it != aPointList.end(); ++it )
|
||||
{
|
||||
VECTOR2D corner = transform(*it);
|
||||
polyline_corners.push_back( wxPoint( corner.x, corner.y ) );
|
||||
polyline_corners.emplace_back( corner.x, corner.y );
|
||||
}
|
||||
|
||||
if( m_DC )
|
||||
|
||||
Reference in New Issue
Block a user