Use range-based loop

This commit is contained in:
Juergen Spitzmueller 2020-03-06 11:20:46 +01:00
parent 228d738868
commit 21567a260c

View File

@ -604,14 +604,12 @@ bool Paragraph::hasChangedInsets(pos_type start, pos_type end) const
LASSERT(start >= 0 && start <= size(), return false);
LASSERT(end > start && end <= size() + 1, return false);
InsetList::const_iterator icit = d->insetlist_.begin();
InsetList::const_iterator iend = d->insetlist_.end();
for (; icit != iend; ++icit) {
if (icit->pos < start)
for (auto const icit : d->insetlist_) {
if (icit.pos < start)
continue;
if (icit->pos >= end)
if (icit.pos >= end)
break;
if (icit->inset && icit->inset->isChanged())
if (icit.inset && icit.inset->isChanged())
return true;
}
return false;