From 175a2063effa1c5a3eab896c6c4b0d07f3588edb Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 10 Jan 2020 12:30:24 +0200 Subject: 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 --- cppcanvas/source/mtfrenderer/polypolyaction.cxx | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'cppcanvas/source/mtfrenderer/polypolyaction.cxx') diff --git a/cppcanvas/source/mtfrenderer/polypolyaction.cxx b/cppcanvas/source/mtfrenderer/polypolyaction.cxx index 8fa1582b82c9..15fa4f5bc776 100644 --- a/cppcanvas/source/mtfrenderer/polypolyaction.cxx +++ b/cppcanvas/source/mtfrenderer/polypolyaction.cxx @@ -454,9 +454,9 @@ namespace cppcanvas { OSL_ENSURE( rState.isLineColorSet || rState.isFillColorSet, "PolyPolyActionFactory::createPolyPolyAction() with empty line and fill color" ); - return std::shared_ptr( new PolyPolyAction( rPoly, rCanvas, rState, - rState.isFillColorSet, - rState.isLineColorSet ) ); + return std::make_shared( rPoly, rCanvas, rState, + rState.isFillColorSet, + rState.isLineColorSet ); } std::shared_ptr PolyPolyActionFactory::createPolyPolyAction( const ::basegfx::B2DPolyPolygon& rPoly, @@ -464,7 +464,7 @@ namespace cppcanvas const OutDevState& rState, const rendering::Texture& rTexture ) { - return std::shared_ptr( new TexturedPolyPolyAction( rPoly, rCanvas, rState, rTexture ) ); + return std::make_shared( rPoly, rCanvas, rState, rTexture ); } std::shared_ptr PolyPolyActionFactory::createLinePolyPolyAction( const ::basegfx::B2DPolyPolygon& rPoly, @@ -474,9 +474,9 @@ namespace cppcanvas OSL_ENSURE( rState.isLineColorSet, "PolyPolyActionFactory::createLinePolyPolyAction() called with empty line color" ); - return std::shared_ptr( new PolyPolyAction( rPoly, rCanvas, rState, - false, - rState.isLineColorSet ) ); + return std::make_shared( rPoly, rCanvas, rState, + false, + rState.isLineColorSet ); } std::shared_ptr PolyPolyActionFactory::createPolyPolyAction( const ::basegfx::B2DPolyPolygon& rPoly, @@ -486,7 +486,7 @@ namespace cppcanvas { OSL_ENSURE( rState.isLineColorSet, "PolyPolyActionFactory::createPolyPolyAction() for strokes called with empty line color" ); - return std::shared_ptr( new StrokedPolyPolyAction( rPoly, rCanvas, rState, rStrokeAttributes ) ); + return std::make_shared( rPoly, rCanvas, rState, rStrokeAttributes ); } std::shared_ptr PolyPolyActionFactory::createPolyPolyAction( const ::basegfx::B2DPolyPolygon& rPoly, @@ -496,10 +496,10 @@ namespace cppcanvas { OSL_ENSURE( rState.isLineColorSet || rState.isFillColorSet, "PolyPolyActionFactory::createPolyPolyAction() with empty line and fill color" ); - return std::shared_ptr( new PolyPolyAction( rPoly, rCanvas, rState, - rState.isFillColorSet, - rState.isLineColorSet, - nTransparency ) ); + return std::make_shared( rPoly, rCanvas, rState, + rState.isFillColorSet, + rState.isLineColorSet, + nTransparency ); } } -- cgit