Add some vector reservations

This commit is contained in:
Marek Roszko
2022-02-05 21:12:29 -05:00
parent 28ce11212c
commit 0a5ddb8d40
5 changed files with 16 additions and 2 deletions
+4
View File
@@ -804,6 +804,8 @@ void GERBER_PLOTTER::Rect( const VECTOR2I& p1, const VECTOR2I& p2, FILL_T fill,
{
std::vector<VECTOR2I> cornerList;
cornerList.reserve( 5 );
// Build corners list
cornerList.push_back( p1 );
@@ -1526,6 +1528,8 @@ void GERBER_PLOTTER::plotRoundRectAsRegion( const VECTOR2I& aRectCenter, const V
RR_EDGE curr_edge;
std::vector<RR_EDGE> rr_outline;
rr_outline.reserve( 4 );
// Build outline coordinates, relative to rectangle center, rotation 0:
// Top left corner 1 (and 4 to 1 left vertical side @ x=-hsizeX)