Kaydet (Commit) 6bb68cae authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

GenericSalLayout: manage the collection of GlyphItem with a vector.

There was a TODO to replace a manually managed array of Glyphs
to use std::list

a GlyphItem is 36 bytes long. the colleciton of GlyphItems is
mostly used in a sequential access. random insert/delete are fairly rare.
using std::list would increase the size by at least 8 to 16 bytes per
element (depending on the size of void*) (25 to 50% overhead)
and would greatly degrade data locality for most iterations loops.
so std::vector seems more appropriate here.
üst 43f3b1fb
......@@ -374,9 +374,7 @@ protected:
bool GetCharWidths( sal_Int32* pCharWidths ) const;
private:
GlyphItem* mpGlyphItems; // TODO: change to GlyphList
int mnGlyphCount;
int mnGlyphCapacity;
GlyphVector m_GlyphItems;
mutable Point maBasePoint;
// enforce proper copy semantic
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment