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
+6
View File
@@ -253,6 +253,8 @@ void PLOTTER::BezierCurve( const VECTOR2I& aStart, const VECTOR2I& aControl1,
int minSegLen = aLineThickness; // The segment min length to approximate a bezier curve
std::vector<VECTOR2I> ctrlPoints;
ctrlPoints.reserve( 4 );
ctrlPoints.push_back( aStart );
ctrlPoints.push_back( aControl1 );
ctrlPoints.push_back( aControl2 );
@@ -295,6 +297,8 @@ void PLOTTER::markerSquare( const VECTOR2I& position, int radius )
std::vector<VECTOR2I> corner_list;
VECTOR2I corner;
corner_list.reserve( 4 );
corner.x = position.x + r;
corner.y = position.y + r;
corner_list.push_back( corner );
@@ -326,6 +330,8 @@ void PLOTTER::markerLozenge( const VECTOR2I& position, int radius )
std::vector<VECTOR2I> corner_list;
VECTOR2I corner;
corner_list.reserve( 4 );
corner.x = position.x;
corner.y = position.y + radius;
corner_list.push_back( corner );