]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfont.C
ws changes mostly
[lyx.git] / src / lyxfont.C
index 2ffce829c8ea4c1039ad2fec9badbef58beb7f56..6416713986ec2acf17785e508873608a6ba96c5e 100644 (file)
@@ -545,7 +545,8 @@ LyXFont & LyXFont::setLyXFamily(string const & fam)
        string const s = ascii_lowercase(fam);
 
        int i = 0;
-       while (s != LyXFamilyNames[i] && LyXFamilyNames[i] != "error")
+       while (LyXFamilyNames[i] != s &&
+              LyXFamilyNames[i] != string("error"))
                ++i;
        if (s == LyXFamilyNames[i])
                setFamily(LyXFont::FONT_FAMILY(i));
@@ -562,7 +563,8 @@ LyXFont & LyXFont::setLyXSeries(string const & ser)
        string const s = ascii_lowercase(ser);
 
        int i = 0;
-       while (s != LyXSeriesNames[i] && LyXSeriesNames[i] != "error") ++i;
+       while (LyXSeriesNames[i] != s &&
+              LyXSeriesNames[i] != string("error")) ++i;
        if (s == LyXSeriesNames[i]) {
                setSeries(LyXFont::FONT_SERIES(i));
        } else
@@ -578,7 +580,8 @@ LyXFont & LyXFont::setLyXShape(string const & sha)
        string const s = ascii_lowercase(sha);
 
        int i = 0;
-       while (s != LyXShapeNames[i] && LyXShapeNames[i] != "error") ++i;
+       while (LyXShapeNames[i] != s &&
+              LyXShapeNames[i] != string("error")) ++i;
        if (s == LyXShapeNames[i]) {
                setShape(LyXFont::FONT_SHAPE(i));
        } else
@@ -593,7 +596,8 @@ LyXFont & LyXFont::setLyXSize(string const & siz)
 {
        string const s = ascii_lowercase(siz);
        int i = 0;
-       while (s != LyXSizeNames[i] && LyXSizeNames[i] != "error") ++i;
+       while (LyXSizeNames[i] != s &&
+              LyXSizeNames[i] != string("error")) ++i;
        if (s == LyXSizeNames[i]) {
                setSize(LyXFont::FONT_SIZE(i));
        } else
@@ -608,7 +612,8 @@ LyXFont::FONT_MISC_STATE LyXFont::setLyXMisc(string const & siz)
 {
        string const s = ascii_lowercase(siz);
        int i = 0;
-       while (s != LyXMiscNames[i] && LyXMiscNames[i] != "error") ++i;
+       while (LyXMiscNames[i] != s &&
+              LyXMiscNames[i] != string("error")) ++i;
        if (s == LyXMiscNames[i])
                return FONT_MISC_STATE(i);
        lyxerr << "LyXFont::setLyXMisc: Unknown misc flag `"