From 6bb68cae7c31918eff8386d5b52be0759386bb60 Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Sun, 4 Mar 2012 07:34:14 -0600 Subject: 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. --- vcl/inc/sallayout.hxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'vcl/inc/sallayout.hxx') diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx index 51a64155f75e..a9a30d03f7e8 100644 --- a/vcl/inc/sallayout.hxx +++ b/vcl/inc/sallayout.hxx @@ -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 -- cgit