summaryrefslogtreecommitdiff
path: root/canvas/source/directx/dx_canvas.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-02-03 16:26:38 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-02-03 23:38:37 +0100
commit6317e10f5b9c347ceb391e049e6d0f3c542f93c4 (patch)
tree5552a3ccc88bfbdf932735292a008271ab4360fa /canvas/source/directx/dx_canvas.cxx
parenta334f77792dfff92e3c97f7f61f59d01fc9338cf (diff)
loplugin:makeshared (clang-cl)
Change-Id: I0c786bf401e514f9d86e33d8ab6366fc5dd1f425 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87887 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'canvas/source/directx/dx_canvas.cxx')
-rw-r--r--canvas/source/directx/dx_canvas.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/canvas/source/directx/dx_canvas.cxx b/canvas/source/directx/dx_canvas.cxx
index 3aace1190f08..39864b14e77d 100644
--- a/canvas/source/directx/dx_canvas.cxx
+++ b/canvas/source/directx/dx_canvas.cxx
@@ -18,6 +18,9 @@
*/
#include <sal/config.h>
+
+#include <memory>
+
#include <sal/log.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
@@ -113,9 +116,8 @@ namespace dxcanvas
maDeviceHelper.init( pSysData->hDC, pOutDev, *this );
maCanvasHelper.setDevice( *this );
maCanvasHelper.setTarget(
- GraphicsProviderSharedPtr(
- new GraphicsProviderImpl(
- Gdiplus::Graphics::FromHDC(pSysData->hDC))));
+ std::make_shared<GraphicsProviderImpl>(
+ Gdiplus::Graphics::FromHDC(pSysData->hDC)));
maArguments.realloc(0);
}
@@ -184,11 +186,11 @@ namespace dxcanvas
throw lang::NoSupportException( "Passed HDC is no mem DC/has no bitmap selected!");
}
- mpTarget.reset( new DXBitmap(
+ mpTarget = std::make_shared<DXBitmap>(
BitmapSharedPtr(
Gdiplus::Bitmap::FromHBITMAP(
hBmp, nullptr) ),
- false ));
+ false );
maCanvasHelper.setTarget( mpTarget );