]> git.lyx.org Git - features.git/commitdiff
restrict scope of temporary variable
authorAndré Pönitz <poenitz@gmx.net>
Sun, 27 Jul 2003 10:44:39 +0000 (10:44 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Sun, 27 Jul 2003 10:44:39 +0000 (10:44 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7377 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/text.C

index d03913f0fbafc72f5343434cafc3e41e247673ec..cafaf963bf8c0f6be1a8077075afb83c3e3f72bf 100644 (file)
@@ -1,3 +1,7 @@
+2003-07-26  André Pönitz  <poenitz@gmx.net>
+
+       * text.C (setHeightOfRow): restrict scope of temporary variable
+
 2003-07-27  Asger Alstrup  <alstrup@local>
 
        * text.C (fill): Optimise algorithm to exploit that we can reuse
index 42667d24af145ebbcedd4b548bde031bd2b584b4..8faf098024dee9ecf2187d4c1c744485d1cf8345 100644 (file)
@@ -1055,8 +1055,6 @@ void LyXText::setHeightOfRow(RowList::iterator rit)
        float layoutasc = 0;
        float layoutdesc = 0;
        float tmptop = 0;
-       LyXFont tmpfont;
-       InsetOld * tmpinset = 0;
 
        // ok, let us initialize the maxasc and maxdesc value.
        // This depends in LaTeX of the font of the last character
@@ -1103,8 +1101,8 @@ void LyXText::setHeightOfRow(RowList::iterator rit)
                // Check if any insets are larger
                for (pos_type pos = rit->pos(); pos <= pos_end; ++pos) {
                        if (pit->isInset(pos)) {
-                               tmpfont = getFont(bv()->buffer(), pit, pos);
-                               tmpinset = pit->getInset(pos);
+                               LyXFont const & tmpfont = getFont(bv()->buffer(), pit, pos);
+                               InsetOld * tmpinset = pit->getInset(pos);
                                if (tmpinset) {
 #if 1 // this is needed for deep update on initialitation
 #warning inset->update FIXME