small simplification (and optimization).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21068 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-10-19 15:42:53 +00:00
parent 65b3790153
commit 0905c4e3c2

View File

@ -1224,13 +1224,8 @@ Font const Paragraph::getFontSettings(BufferParams const & bparams,
BOOST_ASSERT(pos <= size());
}
FontList::const_iterator cit = d->fontlist_.begin();
FontList::const_iterator end = d->fontlist_.end();
for (; cit != end; ++cit)
if (cit->pos() >= pos)
break;
if (cit != end)
FontList::const_iterator cit = d->fontlist_.fontIterator(pos);
if (cit != d->fontlist_.end())
return cit->font();
if (pos == size() && !empty())