From 330fdeda26eefa4f8f1f0993ca811412be872669 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Sun, 27 Jul 2003 10:44:39 +0000 Subject: [PATCH] restrict scope of temporary variable git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7377 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 4 ++++ src/text.C | 6 ++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index d03913f0fb..cafaf963bf 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2003-07-26 André Pönitz + + * text.C (setHeightOfRow): restrict scope of temporary variable + 2003-07-27 Asger Alstrup * text.C (fill): Optimise algorithm to exploit that we can reuse diff --git a/src/text.C b/src/text.C index 42667d24af..8faf098024 100644 --- a/src/text.C +++ b/src/text.C @@ -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 -- 2.39.2