diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-13 14:56:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-14 08:28:31 +0200 |
commit | b0b0aef18fff981fa1f4a1539c150260cc526595 (patch) | |
tree | 5ca719fbb17aa857d132f2d97becfa0ac95b34c2 /sw/source/core/unocore/unoportenum.cxx | |
parent | a4fb52ac0f48b10b72be330fe49d99a9a2471751 (diff) |
clang-tidy modernize-use-emplace in sw
Change-Id: I92fd035824f247dc61edfb18c54b960a7733fdf7
Reviewed-on: https://gerrit.libreoffice.org/42244
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/unocore/unoportenum.cxx')
-rw-r--r-- | sw/source/core/unocore/unoportenum.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index e9bb0f4ab4ff..d40ec5bf5135 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -534,7 +534,7 @@ lcl_InsertRubyPortion( { SwXTextPortion* pPortion = new SwXTextPortion(pUnoCursor, static_txtattr_cast<const SwTextRuby&>(rAttr), xParent, bEnd); - rPortions.push_back(pPortion); + rPortions.emplace_back(pPortion); pPortion->SetCollapsed(rAttr.End() == nullptr); } @@ -616,7 +616,7 @@ static void lcl_ExportBookmark( { pPortion = new SwXTextPortion(pUnoCursor, xParent, PORTION_BOOKMARK_START); - rPortions.push_back(pPortion); + rPortions.emplace_back(pPortion); pPortion->SetBookmark(pPtr->xBookmark); pPortion->SetCollapsed( BkmType::StartEnd == pPtr->nBkmType ); @@ -625,7 +625,7 @@ static void lcl_ExportBookmark( { pPortion = new SwXTextPortion(pUnoCursor, xParent, PORTION_BOOKMARK_END); - rPortions.push_back(pPortion); + rPortions.emplace_back(pPortion); pPortion->SetBookmark(pPtr->xBookmark); } aIter = rBkmArr.erase(aIter); @@ -1155,7 +1155,7 @@ static void lcl_ExportAnnotationStarts( SwXTextPortion* pPortion = new SwXTextPortion( pUnoCursor, xParent, PORTION_ANNOTATION ); pPortion->SetTextField( pPtr->mxAnnotationField ); - rPortions.push_back(pPortion); + rPortions.emplace_back(pPortion); aIter = rAnnotationStartArr.erase(aIter); } @@ -1184,7 +1184,7 @@ static sal_Int32 lcl_ExportFrames( { SwXTextPortion* pPortion = new SwXTextPortion(i_pUnoCursor, i_xParent, *static_cast<SwFrameFormat*>( const_cast<SwModify*>( pFrame ) ) ); - rPortions.push_back(pPortion); + rPortions.emplace_back(pPortion); } i_rFrames.pop_front(); } |