[LyX/master] Fix warning

Jean-Marc Lasgouttes lasgouttes at lyx.org
Mon Jan 9 14:11:10 UTC 2023


commit 6093e7d6615088ce25fe296ecd82ba8f867452fc
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date:   Mon Jan 9 16:06:38 2023 +0100

    Fix warning
    
    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 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mathed/InsetMathBox.cpp b/src/mathed/InsetMathBox.cpp
index 1fe3f20..afaadeb 100644
--- a/src/mathed/InsetMathBox.cpp
+++ b/src/mathed/InsetMathBox.cpp
@@ -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");


More information about the lyx-cvs mailing list