]> git.lyx.org Git - features.git/commitdiff
Squash some MSVC warnings.
authorAngus Leeming <leeming@lyx.org>
Thu, 20 Jan 2005 19:30:14 +0000 (19:30 +0000)
committerAngus Leeming <leeming@lyx.org>
Thu, 20 Jan 2005 19:30:14 +0000 (19:30 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9515 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/ChangeLog
src/mathed/math_spaceinset.C
src/support/ChangeLog
src/support/lyxlib.h
src/support/path.C

index e28962fa279f627f0ce5369cf90159637ec8721a..82577fe5349cd4c88389d99d9fd36a481f19a82e 100644 (file)
@@ -1,3 +1,12 @@
+2005-01-20  Angus Leeming  <leeming@lyx.org>
+
+       * math_spaceinset.C (validate):
+       latex_mathspace[space_] == "negmedspace" is unsafe because both
+       operands are of type "char const *". Performing comparison on
+       the address of the string literal therefore. Fix is to explicitly
+       convert one operand to a string.
+       With thanks to MSVC ;-)
+
 2005-01-19  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
 
        * math_symbolinset.C (validate): require wasysym as needed
index 411903116b5395ff6a48dfdc38df62037e7f94a5..8f71fa0f8ec65d3c1553c9d77d7b971d8b804006 100644 (file)
@@ -119,8 +119,8 @@ void MathSpaceInset::incSpace()
 void MathSpaceInset::validate(LaTeXFeatures & features) const
 {
        if (space_ >= 0 && space_< nSpace) {
-               if ((latex_mathspace[space_] == "negmedspace")
-                || (latex_mathspace[space_] == "negthickspace"))
+               if ((latex_mathspace[space_] == string("negmedspace"))
+                || (latex_mathspace[space_] == string("negthickspace")))
                        features.require("amsmath");
        }
 }
index 5913240d41b3ef92bce668f11d633c564017e8a0..ef5520c2fd436de8061f80c5f7204990ee93abec 100644 (file)
@@ -1,3 +1,10 @@
+2005-01-20  Angus Leeming  <leeming@lyx.org>
+
+       * lyxlib.h (float_equal): promote parameters to double.
+
+       * path.C (Path): silence MSVC warning about block of code that
+       does nothing.
+
 2005-01-20  Asger Ottar Alstrup  <aalstrup@laerdal.dk>
 
        * FileInfo.h, chdir.C, forkedcall.C, forkedcontr.C, getcwd.C,
index 0695269c9037069c23e730261769561df144e1ee..54569babb6d54f506c1734388df106814d66c511 100644 (file)
@@ -61,7 +61,7 @@ std::string const tempName(std::string const & dir = std::string(),
  *
  * This will check if 'var' is approx. equal to 'number' with error of 1/1000
  */
-inline bool float_equal(float var, float number, float error)
+inline bool float_equal(double var, double number, double error)
 {
        return (number - error <= var && var <= number + error);
 }
index 59593145edf593f07628cd740ff3b01683a8c32e..3290274686653992a08a34f86ba06f36c5ea92ae 100644 (file)
@@ -28,8 +28,10 @@ Path::Path(string const & path)
 {
        if (!path.empty()) {
                pushedDir_ = getcwd();
+#if 0
                if (pushedDir_.empty() || chdir(path))
                        /* FIXME: throw */;
+#endif
        } else {
                popped_ = true;
        }