mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Replace unused resize() call
Calling resize(size()) will only zero out elements that exist above the vector size(). The memory is not freed in this case. shrink_to_fit() will accomplish this action (at the discretion of the library)
This commit is contained in:
parent
4d2e953f42
commit
6f8b399c5f
@ -108,7 +108,7 @@ bool STROKE_FONT::LoadNewStrokeFont( const char* const aNewStrokeFont[], int aNe
|
||||
else if( ( coordinate[0] == ' ' ) && ( coordinate[1] == 'R' ) )
|
||||
{
|
||||
if( pointList )
|
||||
pointList->resize( pointList->size() );
|
||||
pointList->shrink_to_fit();
|
||||
|
||||
// Raise pen
|
||||
pointList = nullptr;
|
||||
@ -143,7 +143,7 @@ bool STROKE_FONT::LoadNewStrokeFont( const char* const aNewStrokeFont[], int aNe
|
||||
}
|
||||
|
||||
if( pointList )
|
||||
pointList->resize( pointList->size() );
|
||||
pointList->shrink_to_fit();
|
||||
|
||||
// Compute the bounding box of the glyph
|
||||
g_newStrokeFontGlyphBoundingBoxes->emplace_back( computeBoundingBox( glyph, glyphWidth ) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user