sw/source/core/doc/docredln.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
New commits: commit e8833d4dd9322c01cf5b6d458fc86d3735cf9999 Author: Caolán McNamara <[email protected]> AuthorDate: Mon Jan 21 09:33:04 2019 +0000 Commit: Caolán McNamara <[email protected]> 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 <[email protected]> Tested-by: Caolán McNamara <[email protected]> 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; } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
