[Libreoffice-commits] core.git: svx/source
Julien Nabet
serval2412 at yahoo.fr
Tue Jan 30 16:06:50 UTC 2018
svx/source/svdraw/svdmark.cxx | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
New commits:
commit 3079e5a14ce7e2bacfcd7ed07ded823e69d2d794
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Tue Jan 30 09:15:25 2018 +0100
Use for-range loop for SdrMarkList::Clear
instead of calling n times GetMark
Change-Id: I5a00fd039d42b45dd491d8927dc1e44fe559ce3a
Reviewed-on: https://gerrit.libreoffice.org/48886
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
diff --git a/svx/source/svdraw/svdmark.cxx b/svx/source/svdraw/svdmark.cxx
index faf855bc96a4..fbc060923ef6 100644
--- a/svx/source/svdraw/svdmark.cxx
+++ b/svx/source/svdraw/svdmark.cxx
@@ -214,10 +214,9 @@ void SdrMarkList::ImpForceSort()
void SdrMarkList::Clear()
{
- for(size_t i = 0; i < GetMarkCount(); ++i)
+ for (auto const& elem : maList)
{
- SdrMark* pMark = GetMark(i);
- delete pMark;
+ delete elem;
}
maList.clear();
mbSorted = true; //we're empty, so can be considered sorted
More information about the Libreoffice-commits
mailing list