[Libreoffice-commits] core.git: sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Aug 23 18:42:20 UTC 2018


 sw/source/core/edit/eddel.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 3d13da021afc5e0786dc95ea707fbea50616ded1
Author:     Takeshi Abe <tabe at fixedpoint.jp>
AuthorDate: Tue Aug 21 16:50:01 2018 +0900
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Aug 23 20:41:52 2018 +0200

    sw: Prefer std::vector to undemanded std::list
    
    Change-Id: I2003538f3a7cff2163cbb85f948c0bab9187dfeb
    Reviewed-on: https://gerrit.libreoffice.org/59379
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx
index f60fcbc5be54..658a650c8048 100644
--- a/sw/source/core/edit/eddel.cxx
+++ b/sw/source/core/edit/eddel.cxx
@@ -33,7 +33,7 @@
 #include <globals.hrc>
 
 #include <strings.hrc>
-#include <list>
+#include <vector>
 
 void SwEditShell::DeleteSel( SwPaM& rPam, bool* pUndo )
 {
@@ -158,7 +158,7 @@ bool SwEditShell::Copy( SwEditShell* pDestShell )
     SET_CURR_SHELL( pDestShell );
 
     // List of insert positions for smart insert of block selections
-    std::list< std::shared_ptr<SwPosition> > aInsertList;
+    std::vector< std::shared_ptr<SwPosition> > aInsertList;
 
     // Fill list of insert positions
     {
@@ -210,7 +210,7 @@ bool SwEditShell::Copy( SwEditShell* pDestShell )
     SwNodeIndex aSttNdIdx( pDestShell->GetDoc()->GetNodes() );
     sal_Int32 nSttCntIdx = 0;
     // For block selection this list is filled with the insert positions
-    std::list< std::shared_ptr<SwPosition> >::iterator pNextInsert = aInsertList.begin();
+    auto pNextInsert = aInsertList.begin();
 
     pDestShell->GetDoc()->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
     for(SwPaM& rPaM : GetCursor()->GetRingContainer())


More information about the Libreoffice-commits mailing list