]> git.lyx.org Git - features.git/commitdiff
Fix warning
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 9 Jan 2023 15:06:38 +0000 (16:06 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 9 Jan 2023 15:06:38 +0000 (16:06 +0100)
This was:
../../master/src/mathed/InsetMathBox.cpp:116:20: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::__cxx11::basic_string<wchar_t> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  116 |  for (int i = 0; i < parts.size(); i += 2) {
      |                  ~~^~~~~~~~~~~~~~
../../master/src/mathed/InsetMathBox.cpp:120:20: warning: comparison of integer expressions of different signedness: ‘std::vector<std::__cxx11::basic_string<wchar_t> >::size_type’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]

src/mathed/InsetMathBox.cpp

index 1fe3f20f32b0a2fa72b8a67a80a867d98161a54f..afaadeb83a403094badf094b7098e1c76a36c033 100644 (file)
@@ -113,7 +113,7 @@ void splitAndWrapInMText(MathMLStream & ms, MathData const & cell,
        // Finally, output the complete inset: escape the test in <m:mtext>, leave
        // the other tags untouched.
        ms << MTag("mrow", attributes);
-       for (int i = 0; i < parts.size(); i += 2) {
+       for (std::size_t i = 0; i < parts.size(); i += 2) {
                ms << MTag("mtext")
                   << parts[i]
                   << ETag("mtext");