From 2d2259c848b43f9f04d5bb6073c00b8ae124534a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 13 Sep 2017 16:43:57 +0200 Subject: clang-tidy modernize-use-emplace in test..vbahelper Change-Id: Ifbe1dd7c9d5dde33f7419548670434591b1a1d82 Reviewed-on: https://gerrit.libreoffice.org/42258 Tested-by: Jenkins Reviewed-by: Noel Grandin --- vbahelper/source/vbahelper/vbaeventshelperbase.cxx | 2 +- vbahelper/source/vbahelper/vbashapes.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'vbahelper') diff --git a/vbahelper/source/vbahelper/vbaeventshelperbase.cxx b/vbahelper/source/vbahelper/vbaeventshelperbase.cxx index 4fb57ff85f56..302799dc015f 100644 --- a/vbahelper/source/vbahelper/vbaeventshelperbase.cxx +++ b/vbahelper/source/vbahelper/vbaeventshelperbase.cxx @@ -61,7 +61,7 @@ sal_Bool SAL_CALL VbaEventsHelperBase::processVbaEvent( sal_Int32 nEventId, cons processing the original event. All unprocessed events are collected in a queue. First element in the queue is the next event to be processed. */ EventQueue aEventQueue; - aEventQueue.push_back( EventQueueEntry( nEventId, rArgs ) ); + aEventQueue.emplace_back( nEventId, rArgs ); /* bCancel will contain the current Cancel value. It is possible that multiple events will try to modify the Cancel value. Every event diff --git a/vbahelper/source/vbahelper/vbashapes.cxx b/vbahelper/source/vbahelper/vbashapes.cxx index 18d042ad0446..6d5849e91251 100644 --- a/vbahelper/source/vbahelper/vbashapes.cxx +++ b/vbahelper/source/vbahelper/vbashapes.cxx @@ -80,7 +80,7 @@ void ScVbaShapes::initBaseCollection() sal_Int32 nLen = m_xIndexAccess->getCount(); aShapes.reserve( nLen ); for ( sal_Int32 index=0; index( m_xIndexAccess->getByIndex( index ) , uno::UNO_QUERY ) ); + aShapes.emplace_back( m_xIndexAccess->getByIndex( index ) , uno::UNO_QUERY ); uno::Reference< container::XIndexAccess > xShapes( new XNamedObjectCollectionHelper< drawing::XShape >( aShapes ) ); m_xIndexAccess.set( xShapes, uno::UNO_QUERY ); m_xNameAccess.set( xShapes, uno::UNO_QUERY ); -- cgit