sw/source/core/table/swtable.cxx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
New commits: commit d063bea95848fd3b899b9809cb8e69eb61ded2fc Author: Takeshi Abe <t...@fixedpoint.jp> AuthorDate: Fri Aug 10 13:15:24 2018 +0900 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Aug 10 08:19:21 2018 +0200 sw: Reduce redundant copy Change-Id: Iee865bbbc5cbb98ba64305c6e90273ce3c719e6e Reviewed-on: https://gerrit.libreoffice.org/58804 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2...@yahoo.fr> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index 78d83a4d07ca..6fb13bae04e9 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -1160,14 +1160,8 @@ static void lcl_CalcNewWidths( std::list<sal_uInt16> &rSpanPos, ChangeList& rCha } } - rChanges.clear(); - ChangeList::iterator pCopy = aNewChanges.begin(); - while( pCopy != aNewChanges.end() ) - rChanges.push_back( *pCopy++ ); - rSpanPos.clear(); - std::list<sal_uInt16>::iterator pSpCopy = aNewSpanPos.begin(); - while( pSpCopy != aNewSpanPos.end() ) - rSpanPos.push_back( *pSpCopy++ ); + rChanges.swap(aNewChanges); + rSpanPos.swap(aNewSpanPos); } void SwTable::NewSetTabCols( Parm &rParm, const SwTabCols &rNew, _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits