summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-03-23 21:25:44 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-03-24 11:24:32 +0000
commit27bcd3137e522e1e5c507a4c754a448f8fe08846 (patch)
tree9b9898c8d1576597877485944b1fa927fb1385e9 /vcl
parenta298648302b4ba7765816f3fbe4d89c0cfcb3a57 (diff)
shared_ptr->unique_ptr
Change-Id: I89aa885c2d5a5c1150ac83b515c0bb84ff2ce039
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/unx/glyphcache.hxx4
-rw-r--r--vcl/unx/generic/gdi/cairotextrender.cxx2
-rw-r--r--vcl/unx/generic/glyphs/freetype_glyphcache.cxx4
3 files changed, 5 insertions, 5 deletions
diff --git a/vcl/inc/unx/glyphcache.hxx b/vcl/inc/unx/glyphcache.hxx
index 4e31a7189744..4c0ce0d2695a 100644
--- a/vcl/inc/unx/glyphcache.hxx
+++ b/vcl/inc/unx/glyphcache.hxx
@@ -123,7 +123,7 @@ public:
bool TestFont() const { return mbFaceOk;}
FT_Face GetFtFace() const;
int GetLoadFlags() const { return (mnLoadFlags & ~FT_LOAD_IGNORE_TRANSFORM); }
- const std::shared_ptr<FontConfigFontOptions>& GetFontOptions() const;
+ const FontConfigFontOptions* GetFontOptions() const;
bool NeedsArtificialBold() const { return mbArtBold; }
bool NeedsArtificialItalic() const { return mbArtItalic; }
@@ -182,7 +182,7 @@ private:
FT_FaceRec_* maFaceFT;
FT_SizeRec_* maSizeFT;
- mutable std::shared_ptr<FontConfigFontOptions> mxFontOptions;
+ mutable std::unique_ptr<FontConfigFontOptions> mxFontOptions;
bool mbFaceOk;
bool mbArtItalic;
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx
index 842a6b643ed7..11cedcc66701 100644
--- a/vcl/unx/generic/gdi/cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/cairotextrender.cxx
@@ -229,7 +229,7 @@ void CairoTextRender::DrawTextLayout(const CommonSalLayout& rLayout)
FT_Face aFace = rFont.GetFtFace();
CairoFontsCache::CacheId aId;
aId.maFace = aFace;
- aId.mpOptions = rFont.GetFontOptions().get();
+ aId.mpOptions = rFont.GetFontOptions();
aId.mbEmbolden = rFont.NeedsArtificialBold();
cairo_matrix_t m;
diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
index 903f560e1a55..0737d2bdf3d1 100644
--- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
@@ -466,14 +466,14 @@ namespace
}
}
-const std::shared_ptr<FontConfigFontOptions>& FreetypeFont::GetFontOptions() const
+const FontConfigFontOptions* FreetypeFont::GetFontOptions() const
{
if (!mxFontOptions)
{
mxFontOptions.reset(GetFCFontOptions(mpFontInfo->GetFontAttributes(), maFontSelData.mnHeight));
mxFontOptions->SyncPattern(GetFontFileName(), GetFontFaceIndex(), NeedsArtificialBold());
}
- return mxFontOptions;
+ return mxFontOptions.get();
}
const OString& FreetypeFont::GetFontFileName() const