[Libreoffice-commits] core.git: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Jan 21 11:34:29 UTC 2019
sw/source/core/doc/docredln.cxx | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit e8833d4dd9322c01cf5b6d458fc86d3735cf9999
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Jan 21 09:33:04 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Jan 21 12:34:08 2019 +0100
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: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index c1873fbaad74..47f9f9227506 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -623,10 +623,11 @@ void SwRedlineTable::Remove( size_type nP )
void SwRedlineTable::DeleteAndDestroyAll()
{
- while (!maVector.empty())
+ auto nCount = maVector.size();
+ while (nCount)
{
auto const pRedline = maVector.back();
- maVector.erase(maVector.back());
+ maVector.erase(--nCount);
LOKRedlineNotification(RedlineNotification::Remove, pRedline);
delete pRedline;
}
More information about the Libreoffice-commits
mailing list