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…
Reference in New Issue