diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2018-01-30 09:15:25 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2018-01-30 17:06:28 +0100 |
commit | 3079e5a14ce7e2bacfcd7ed07ded823e69d2d794 (patch) | |
tree | b8e0c86c7b894c8d7aaee5c4c518f331976efb4c /svx/source/svdraw/svdmark.cxx | |
parent | 7c46d7f2556aa726d531d8afca7c181ba430900b (diff) |
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@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'svx/source/svdraw/svdmark.cxx')
-rw-r--r-- | svx/source/svdraw/svdmark.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
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 |