summaryrefslogtreecommitdiff
path: root/vcl/win
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-10-17 13:40:38 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-11-14 10:19:32 +0100
commit8f54136caa786523fd224f6c98fc8e7c45cd805d (patch)
treee77e4cba4e281a32e2bee5fd6a10d43ae6c7a360 /vcl/win
parentb5344daa0cfc31cf187832261651e5490b19d922 (diff)
use std::unique_ptr for SalLayout
to make the ownership passing around more obvious Change-Id: I147ec6d9cfe7566cf3600685e0730ed741c2d90d Reviewed-on: https://gerrit.libreoffice.org/43454 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/win')
-rw-r--r--vcl/win/gdi/winlayout.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index f157f7b81772..d6b9cd4b57c4 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -285,14 +285,14 @@ bool ExTextOutRenderer::operator ()(CommonSalLayout const &rLayout,
return true;
}
-SalLayout* WinSalGraphics::GetTextLayout(ImplLayoutArgs& /*rArgs*/, int nFallbackLevel)
+std::unique_ptr<SalLayout> WinSalGraphics::GetTextLayout(ImplLayoutArgs& /*rArgs*/, int nFallbackLevel)
{
if (!mpWinFontEntry[nFallbackLevel])
return nullptr;
assert(mpWinFontData[nFallbackLevel]);
- return new CommonSalLayout(getHDC(), *mpWinFontEntry[nFallbackLevel], *mpWinFontData[nFallbackLevel]);
+ return std::unique_ptr<SalLayout>(new CommonSalLayout(getHDC(), *mpWinFontEntry[nFallbackLevel], *mpWinFontData[nFallbackLevel]));
}
LogicalFontInstance * WinSalGraphics::GetWinFontEntry(int const nFallbackLevel)