From d96c114171dada05caffd9a50f870809ebd0c450 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 17 May 2016 13:09:11 +0200 Subject: clang-tidy modernize-make-shared Change-Id: I3fa866bfb3093fc876474a9d9db29fe05dc2af3a Reviewed-on: https://gerrit.libreoffice.org/25056 Tested-by: Jenkins Reviewed-by: Noel Grandin --- slideshow/source/engine/shapes/appletshape.cxx | 12 ++++++------ slideshow/source/engine/shapes/backgroundshape.cxx | 5 ++--- slideshow/source/engine/shapes/mediashape.cxx | 6 +++--- slideshow/source/engine/slide/layer.cxx | 2 +- slideshow/source/engine/slide/slideimpl.cxx | 2 +- slideshow/source/engine/slideshowimpl.cxx | 4 ++-- 6 files changed, 15 insertions(+), 16 deletions(-) (limited to 'slideshow') diff --git a/slideshow/source/engine/shapes/appletshape.cxx b/slideshow/source/engine/shapes/appletshape.cxx index 3f3e20a66616..17aa2ec61833 100644 --- a/slideshow/source/engine/shapes/appletshape.cxx +++ b/slideshow/source/engine/shapes/appletshape.cxx @@ -148,12 +148,12 @@ namespace slideshow try { maViewAppletShapes.push_back( - ViewAppletShapeSharedPtr( new ViewAppletShape( rNewLayer, - getXShape(), - maServiceName, - mpPropCopyTable, - mnNumPropEntries, - mxComponentContext ))); + std::make_shared( rNewLayer, + getXShape(), + maServiceName, + mpPropCopyTable, + mnNumPropEntries, + mxComponentContext )); // push new size to view shape maViewAppletShapes.back()->resize( getBounds() ); diff --git a/slideshow/source/engine/shapes/backgroundshape.cxx b/slideshow/source/engine/shapes/backgroundshape.cxx index 15de5c28632d..4b4a5b1384a0 100644 --- a/slideshow/source/engine/shapes/backgroundshape.cxx +++ b/slideshow/source/engine/shapes/backgroundshape.cxx @@ -170,9 +170,8 @@ namespace slideshow } maViewShapes.push_back( - ViewBackgroundShapeSharedPtr( - new ViewBackgroundShape( rNewLayer, - maBounds ) ) ); + std::make_shared( + rNewLayer, maBounds ) ); // render the Shape on the newly added ViewLayer if( bRedrawLayer ) diff --git a/slideshow/source/engine/shapes/mediashape.cxx b/slideshow/source/engine/shapes/mediashape.cxx index 0213287c0b49..62a83117d78d 100644 --- a/slideshow/source/engine/shapes/mediashape.cxx +++ b/slideshow/source/engine/shapes/mediashape.cxx @@ -123,9 +123,9 @@ namespace slideshow bool bRedrawLayer ) { maViewMediaShapes.push_back( - ViewMediaShapeSharedPtr( new ViewMediaShape( rNewLayer, - getXShape(), - mxComponentContext ))); + std::make_shared( rNewLayer, + getXShape(), + mxComponentContext )); // push new size to view shape maViewMediaShapes.back()->resize( getBounds() ); diff --git a/slideshow/source/engine/slide/layer.cxx b/slideshow/source/engine/slide/layer.cxx index cc2f3e6be3ce..0aa3352192a8 100644 --- a/slideshow/source/engine/slide/layer.cxx +++ b/slideshow/source/engine/slide/layer.cxx @@ -239,7 +239,7 @@ namespace slideshow } } - return EndUpdater(new LayerEndUpdate(shared_from_this())); + return std::make_shared(shared_from_this()); } void Layer::endUpdate() diff --git a/slideshow/source/engine/slide/slideimpl.cxx b/slideshow/source/engine/slide/slideimpl.cxx index a3067267f3de..0c63e51badb4 100644 --- a/slideshow/source/engine/slide/slideimpl.cxx +++ b/slideshow/source/engine/slide/slideimpl.cxx @@ -697,7 +697,7 @@ SlideBitmapSharedPtr SlideImpl::createCurrentSlideBitmap( const UnoViewSharedPtr initSlideBackground( pBitmapCanvas, rBmpSize ); mpLayerManager->renderTo( pBitmapCanvas ); - return SlideBitmapSharedPtr( new SlideBitmap( pBitmap ) ); + return std::make_shared( pBitmap ); } namespace diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx index af483455d47d..ff273727af14 100644 --- a/slideshow/source/engine/slideshowimpl.cxx +++ b/slideshow/source/engine/slideshowimpl.cxx @@ -1856,8 +1856,8 @@ void SlideShowImpl::addShapeEventListener( aIter = maShapeEventListeners.insert( ShapeEventListenerMap::value_type( xShape, - std::shared_ptr( - new comphelper::OInterfaceContainerHelper2(m_aMutex)))).first; + std::make_shared( + m_aMutex))).first; } // add new listener to broadcaster -- cgit