]> git.lyx.org Git - features.git/commitdiff
avoid an extra copy in FontIterator::operator*
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 11 Apr 2005 13:35:15 +0000 (13:35 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 11 Apr 2005 13:35:15 +0000 (13:35 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9804 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/FontIterator.C
src/FontIterator.h

index bc8382f1a7f0e8f6ed727cd69ee060888db45fe3..216b4851b3eacde02068801bccc92a6c0b7ac060 100644 (file)
@@ -1,3 +1,7 @@
+2005-04-06  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * FontIterator.C (operator*): avoid a copy of the font.
+
 2005-04-10  Martin Vermeer  <martin.vermeer@hut.fi>
 
        * rowpainter.C (getFont): fix language bug from previous fix
index eeaadd0ffcb17453a93a0259f0fb4d3030775d01..dab014bba1ff3a2f4065bfc462297ad6be0274f5 100644 (file)
@@ -27,7 +27,7 @@ FontIterator::FontIterator(LyXText const & text, Paragraph const & par,
 {}
 
 
-LyXFont FontIterator::operator*() const
+LyXFont const & FontIterator::operator*() const
 {
        return font_;
 }
index 7776f5f4df18eeed8a813ace4bddd225fbdb893c..262d7f90017da7dbd99074c5b3aec25a9691e496 100644 (file)
@@ -34,7 +34,7 @@ public:
        ///
        FontIterator(LyXText const & text, Paragraph const & par, lyx::pos_type pos);
        ///
-       LyXFont operator*() const;
+       LyXFont const & operator*() const;
        ///
        FontIterator & operator++();
        ///