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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Jan 22 17:32:26 UTC 2019


 sw/source/core/doc/docredln.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 25970c5703c1680ba058056b54ee588547ae49ad
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Jan 21 13:56:59 2019 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Jan 22 17:31:57 2019 +0000

    partially revert ofz#11275 erase via position
    
    partial revert of:
    commit e8833d4dd9322c01cf5b6d458fc86d3735cf9999
    Author: Caolán McNamara <caolanm at redhat.com>
    Date:   Mon Jan 21 09:33:04 2019 +0000
    
    because of the concerns of https://gerrit.libreoffice.org/#/c/66665/ i.e.
    "this looks like it reintroduces the bug fixed in
     471212d464f54054f7419ef1890267d0def852d9"
    
    but continue to erase the final entry by its known index, rather than force a
    lookup of the index of the final entry
    
    Change-Id: Ic14aa133779b5555e8856d6c8fefe4e9b854e2fa

diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index 47f9f9227506..eeba3836e663 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -623,11 +623,10 @@ void SwRedlineTable::Remove( size_type nP )
 
 void SwRedlineTable::DeleteAndDestroyAll()
 {
-    auto nCount = maVector.size();
-    while (nCount)
+    while (!maVector.empty())
     {
         auto const pRedline = maVector.back();
-        maVector.erase(--nCount);
+        maVector.erase(maVector.size() - 1);
         LOKRedlineNotification(RedlineNotification::Remove, pRedline);
         delete pRedline;
     }


More information about the Libreoffice-commits mailing list