summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-01-10 12:30:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-01-10 13:07:41 +0100
commit175a2063effa1c5a3eab896c6c4b0d07f3588edb (patch)
tree4a252a7e9e6e714343e9ff21c3d78c8e41086009 /canvas
parentddf901664d3dd12191f98b77182652a6889f2b26 (diff)
use more std::make_shared
found using 'git grep', I tried using clang-tidy, but it only successfully found a tiny fraction of these Change-Id: I61c7d85105ff7a911722750e759d6641d578da33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'canvas')
-rw-r--r--canvas/source/directx/dx_9rm.cxx5
-rw-r--r--canvas/source/tools/surfaceproxymanager.cxx6
2 files changed, 4 insertions, 7 deletions
diff --git a/canvas/source/directx/dx_9rm.cxx b/canvas/source/directx/dx_9rm.cxx
index ea650b9f9f5f..7f058a2a45bc 100644
--- a/canvas/source/directx/dx_9rm.cxx
+++ b/canvas/source/directx/dx_9rm.cxx
@@ -471,8 +471,7 @@ namespace dxcanvas
::basegfx::B2IVector aPageSize(maPageSize);
while(true)
{
- mpTexture = std::shared_ptr<canvas::ISurface>(
- new DXSurface(*this,aPageSize));
+ mpTexture = std::make_shared<DXSurface>(*this,aPageSize);
if(mpTexture->isValid())
break;
@@ -950,7 +949,7 @@ namespace dxcanvas
if(mpTexture.use_count() == 1)
return mpTexture;
- return std::shared_ptr<canvas::ISurface>( new DXSurface(*this,aSize) );
+ return std::make_shared<DXSurface>(*this,aSize);
}
diff --git a/canvas/source/tools/surfaceproxymanager.cxx b/canvas/source/tools/surfaceproxymanager.cxx
index ef70b824e9e0..126e1bd8c2ad 100644
--- a/canvas/source/tools/surfaceproxymanager.cxx
+++ b/canvas/source/tools/surfaceproxymanager.cxx
@@ -55,7 +55,7 @@ namespace canvas
// not much to do for now, simply allocate a new surface
// proxy from our internal pool and initialize this thing
// properly. we *don't* create a hardware surface for now.
- return std::shared_ptr<ISurfaceProxy>(new SurfaceProxy(pBuffer,mpPageManager));
+ return std::make_shared<SurfaceProxy>(pBuffer,mpPageManager);
}
private:
@@ -66,9 +66,7 @@ namespace canvas
std::shared_ptr<ISurfaceProxyManager> createSurfaceProxyManager( const std::shared_ptr<IRenderModule>& rRenderModule )
{
- return std::shared_ptr<ISurfaceProxyManager>(
- new SurfaceProxyManager(
- rRenderModule));
+ return std::make_shared<SurfaceProxyManager>(rRenderModule);
}
}