summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-15 14:35:43 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-17 10:16:35 +0200
commit5789a1da0f2354c527bbe61f9620278b27e2e23b (patch)
tree648ede7fb9664ad2d77a81c9aa39cb5cb80aae53 /vcl
parenta903b9ba625b7fc09640007794d6f6a6fc6addba (diff)
loplugin:useuniqueptr in GlyphCache
Change-Id: I4d6cca83f321f74faae7d2c6d0481a864f5f0b95
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/unx/glyphcache.hxx2
-rw-r--r--vcl/unx/generic/glyphs/glyphcache.cxx6
2 files changed, 3 insertions, 5 deletions
diff --git a/vcl/inc/unx/glyphcache.hxx b/vcl/inc/unx/glyphcache.hxx
index 42b2f4244450..ba56ecf48b75 100644
--- a/vcl/inc/unx/glyphcache.hxx
+++ b/vcl/inc/unx/glyphcache.hxx
@@ -93,7 +93,7 @@ private:
mutable int mnGlyphCount;
FreetypeFont* mpCurrentGCFont;
- FreetypeManager* mpFtManager;
+ std::unique_ptr<FreetypeManager> mpFtManager;
};
class GlyphData
diff --git a/vcl/unx/generic/glyphs/glyphcache.cxx b/vcl/unx/generic/glyphs/glyphcache.cxx
index aaff8d36535f..fa5bfb6a5de1 100644
--- a/vcl/unx/generic/glyphs/glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/glyphcache.cxx
@@ -36,17 +36,15 @@ GlyphCache::GlyphCache()
mnBytesUsed(sizeof(GlyphCache)),
mnLruIndex(0),
mnGlyphCount(0),
- mpCurrentGCFont(nullptr),
- mpFtManager(nullptr)
+ mpCurrentGCFont(nullptr)
{
pInstance = this;
- mpFtManager = new FreetypeManager;
+ mpFtManager.reset( new FreetypeManager );
}
GlyphCache::~GlyphCache()
{
InvalidateAllGlyphs();
- delete mpFtManager;
}
void GlyphCache::InvalidateAllGlyphs()