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

ofz#11275 erase via position

rather than searching pointer each time

Change-Id: I0db8990b39cce024fbf0bfc6ebd091a5fa210c02
Reviewed-on: https://gerrit.libreoffice.org/66665
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 06c740aa
...@@ -623,10 +623,11 @@ void SwRedlineTable::Remove( size_type nP ) ...@@ -623,10 +623,11 @@ void SwRedlineTable::Remove( size_type nP )
void SwRedlineTable::DeleteAndDestroyAll() void SwRedlineTable::DeleteAndDestroyAll()
{ {
while (!maVector.empty()) auto nCount = maVector.size();
while (nCount)
{ {
auto const pRedline = maVector.back(); auto const pRedline = maVector.back();
maVector.erase(maVector.back()); maVector.erase(--nCount);
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