As flagged by MSVC. Committing now.
-- 
Angus
Index: src/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v
retrieving revision 1.2096
diff -u -p -r1.2096 ChangeLog
--- src/ChangeLog	20 Jan 2005 21:34:22 -0000	1.2096
+++ src/ChangeLog	20 Jan 2005 21:55:43 -0000
@@ -1,3 +1,11 @@
+2005-01-20  Angus Leeming  <[EMAIL PROTECTED]>
+
+	* lyxfont.C (setLyXFamily, setLyXSeries, setLyXShape, setLyXSize) 
+	(setLyXMisc): (char string literal) != (char string literal) is
+	performing a comparison on the addresses. Convert one operand
+	explicitly to string to guarantee expected behaviour.
+	From MSVC warning.
+
 2005-01-20  Asger Ottar Alstrup  <[EMAIL PROTECTED]>
 
 	* buffer.C:
Index: src/lyxfont.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxfont.C,v
retrieving revision 1.108
diff -u -p -r1.108 lyxfont.C
--- src/lyxfont.C	14 Aug 2004 18:41:25 -0000	1.108
+++ src/lyxfont.C	20 Jan 2005 21:55:44 -0000
@@ -545,7 +545,8 @@ LyXFont & LyXFont::setLyXFamily(string c
 	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 c
 	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 co
 	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 con
 {
 	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::setLyX
 {
 	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 `"

Reply via email to