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

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Sun Aug 29 07:34:03 UTC 2021


 sw/source/core/text/porlay.cxx |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 3b15eda58e11a3a46319d4e0489391cb78cec0ab
Author:     Noel Grandin <noel at peralex.com>
AuthorDate: Sat Aug 28 19:08:43 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Aug 29 09:33:30 2021 +0200

    no need for a vector here
    
    Change-Id: Ie456abf9afeda887366b5be2f0161e3ec464e36e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121211
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 9c214ac714ce..2aeced43f463 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -185,18 +185,15 @@ void SwLineLayout::DeleteNext()
 {
     if (!m_pNext)
         return;
-    std::vector<SwLineLayout*> aNexts;
     SwLineLayout* pNext = m_pNext;
     do
     {
-        aNexts.push_back(pNext);
         SwLineLayout* pLastNext = pNext;
         pNext = pNext->GetNext();
         pLastNext->SetNext(nullptr);
+        delete pLastNext;
     }
     while (pNext);
-    for (auto a : aNexts)
-        delete a;
 }
 
 void SwLineLayout::Height(const sal_uInt32 nNew, const bool bText)


More information about the Libreoffice-commits mailing list