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>
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user