]> git.lyx.org Git - features.git/commitdiff
qt3/qfont_loader.h: added comment about pointer reference.
authorAbdelrazak Younes <younes@lyx.org>
Thu, 25 May 2006 10:02:01 +0000 (10:02 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Thu, 25 May 2006 10:02:01 +0000 (10:02 +0000)
qt4/qfont_loader.h: reverted to last version and added comment about pointer reference.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13927 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt3/qfont_loader.h
src/frontends/qt4/qfont_loader.h

index 3a03468d0c19574c819cc83041f280c7b32275f4..7b564858459dcced6bfb38999614c715374d504b 100644 (file)
@@ -83,6 +83,8 @@ public:
 
        /// Get font info (font + metrics) for the given LyX font.
        QLFontInfo & fontinfo(LyXFont const & f) {
+               // fi is a reference to the pointer type (QLFontInfo *) in the
+               // fontinfo_ table.
                QLFontInfo * & fi =
                        fontinfo_[f.family()][f.series()][f.realShape()][f.size()];
                if (!fi)
index ef283ff046d0418772d4a38a0a7ad50bcbf14c6c..d4c41ec2aa14a7edd0bf677bab4c710127404149 100644 (file)
@@ -83,13 +83,12 @@ public:
 
        /// Get font info (font + metrics) for the given LyX font.
        QLFontInfo & fontinfo(LyXFont const & f) {
-               QLFontInfo * fi =
+               // fi is a reference to the pointer type (QLFontInfo *) in the
+               // fontinfo_ table.
+               QLFontInfo * & fi =
                        fontinfo_[f.family()][f.series()][f.realShape()][f.size()];
-               if (!fi) {
+               if (!fi)
                        fi = new QLFontInfo(f);
-                       fontinfo_[f.family()][f.series()][f.realShape()][f.size()]
-                               = fi;
-               }
                return *fi;
        }