From 97e5041a4abfec0820b8c8662577e83ce0e6c3cd Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Sun, 19 Oct 2008 07:42:41 +0000 Subject: [PATCH] some more small optimization. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26960 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Paragraph.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 61ca78ae13..e46faab4b9 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -1178,7 +1178,7 @@ void Paragraph::write(ostream & os, BufferParams const & bparams, break; // Write font changes - Font font2 = getFontSettings(bparams, i); + Font const & font2 = getFontSettings(bparams, i); if (font2 != font1) { font2.lyxWriteChanges(font1, os); column = 0; @@ -1413,13 +1413,14 @@ Font const Paragraph::getFont(BufferParams const & bparams, pos_type pos, Font font = getFontSettings(bparams, pos); pos_type const body_pos = beginOfBody(); + FontInfo & fi = font.fontInfo(); if (pos < body_pos) - font.fontInfo().realize(d->layout_->labelfont); + fi.realize(d->layout_->labelfont); else - font.fontInfo().realize(d->layout_->font); + fi.realize(d->layout_->font); - font.fontInfo().realize(outerfont.fontInfo()); - font.fontInfo().realize(bparams.getFont().fontInfo()); + fi.realize(outerfont.fontInfo()); + fi.realize(bparams.getFont().fontInfo()); return font; } -- 2.39.5