diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-25 16:23:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-29 06:45:42 +0000 |
commit | e6ffb539ee232ea0c679928ff456c1cf97429f63 (patch) | |
tree | e4b71a9bd49edba1a0f1c95f60f6da81433d1983 /drawinglayer | |
parent | bbc7ed9c379019f31dc7ac234cf83ea151601465 (diff) |
loplugin:vclwidgets check for assigning from VclPt<T> to T*
Inspired by a recent bug report where we were assigning the result
of VclPtr<T>::Create to a raw pointer.
As a consequence, we also need to change various methods that were
returning newly created Window subclasses via raw pointer, to
instead return those via VclPtr
Change-Id: I8118e0195a5b2b4780e646cfb0e151692e54ae2b
Reviewed-on: https://gerrit.libreoffice.org/31318
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/source/processor2d/vclhelperbufferdevice.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx index 38ca3b11c6dc..abeb6fcdf8f4 100644 --- a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx +++ b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx @@ -58,7 +58,7 @@ namespace VDevBuffer(); virtual ~VDevBuffer() override; - VirtualDevice* alloc(OutputDevice& rOutDev, const Size& rSizePixel, bool bClear, bool bMonoChrome); + VclPtr<VirtualDevice> alloc(OutputDevice& rOutDev, const Size& rSizePixel, bool bClear, bool bMonoChrome); void free(VirtualDevice& rDevice); // Timer virtuals @@ -91,10 +91,10 @@ namespace } } - VirtualDevice* VDevBuffer::alloc(OutputDevice& rOutDev, const Size& rSizePixel, bool bClear, bool bMonoChrome) + VclPtr<VirtualDevice> VDevBuffer::alloc(OutputDevice& rOutDev, const Size& rSizePixel, bool bClear, bool bMonoChrome) { ::osl::MutexGuard aGuard(m_aMutex); - VirtualDevice* pRetval = nullptr; + VclPtr<VirtualDevice> pRetval; sal_Int32 nBits = bMonoChrome ? 1 : rOutDev.GetBitCount(); |