From 0905c4e3c28176536681351e1c68521edef34aa9 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Fri, 19 Oct 2007 15:42:53 +0000 Subject: [PATCH] small simplification (and optimization). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21068 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Paragraph.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index a324d80989..7ee9000674 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -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()) -- 2.39.2