summaryrefslogtreecommitdiff
path: root/vcl/headless
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-11 09:48:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-01-13 06:49:23 +0000
commite8b49f09074fe184374bee5062715357427ae044 (patch)
treeb9cf1f5e3d7ab8b98345a512b6ddb0da42fe2919 /vcl/headless
parent5e0e27e758e6f7fa325f36e6e51540e10bab0fdc (diff)
new loplugin: useuniqueptr: vcl
Change-Id: Idcbc8655108ff57c06c33bbcabd652387bf3c4ec Reviewed-on: https://gerrit.libreoffice.org/32948 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/headless')
-rw-r--r--vcl/headless/svpglyphcache.cxx5
-rw-r--r--vcl/headless/svpinst.cxx2
2 files changed, 3 insertions, 4 deletions
diff --git a/vcl/headless/svpglyphcache.cxx b/vcl/headless/svpglyphcache.cxx
index 087fb7c4864b..cff68e31f337 100644
--- a/vcl/headless/svpglyphcache.cxx
+++ b/vcl/headless/svpglyphcache.cxx
@@ -33,15 +33,15 @@ namespace
struct GlyphCacheHolder
{
private:
- GlyphCache* m_pSvpGlyphCache;
+ std::unique_ptr<GlyphCache> m_pSvpGlyphCache;
GlyphCacheHolder(const GlyphCacheHolder&) = delete;
GlyphCacheHolder& operator=(const GlyphCacheHolder&) = delete;
public:
GlyphCacheHolder()
+ : m_pSvpGlyphCache( new GlyphCache )
{
- m_pSvpGlyphCache = new GlyphCache;
}
GlyphCache& getGlyphCache()
{
@@ -49,7 +49,6 @@ namespace
}
~GlyphCacheHolder()
{
- delete m_pSvpGlyphCache;
}
};
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 0397342f1d1c..710305d18d15 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -234,7 +234,7 @@ bool SvpSalInstance::CheckTimeout( bool bExecuteTimers )
m_aTimeout = aTimeOfDay;
m_aTimeout += m_nTimeoutMS;
- osl::Guard< comphelper::SolarMutex > aGuard( mpSalYieldMutex );
+ osl::Guard< comphelper::SolarMutex > aGuard( mpSalYieldMutex.get() );
// notify
ImplSVData* pSVData = ImplGetSVData();