Kaydet (Commit) 25970c57 authored tarafından Caolán McNamara's avatar Caolán McNamara

partially revert ofz#11275 erase via position

partial revert of:
commit e8833d4d
Author: Caolán McNamara <caolanm@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
 471212d4"

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
üst 46efac59
...@@ -623,11 +623,10 @@ void SwRedlineTable::Remove( size_type nP ) ...@@ -623,11 +623,10 @@ void SwRedlineTable::Remove( size_type nP )
void SwRedlineTable::DeleteAndDestroyAll() void SwRedlineTable::DeleteAndDestroyAll()
{ {
auto nCount = maVector.size(); while (!maVector.empty())
while (nCount)
{ {
auto const pRedline = maVector.back(); auto const pRedline = maVector.back();
maVector.erase(--nCount); maVector.erase(maVector.size() - 1);
LOKRedlineNotification(RedlineNotification::Remove, pRedline); LOKRedlineNotification(RedlineNotification::Remove, pRedline);
delete pRedline; delete pRedline;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment