]> git.lyx.org Git - lyx.git/commitdiff
improved data types for prefix length and pointer diff
authorStephan Witt <switt@lyx.org>
Fri, 20 Nov 2015 19:48:56 +0000 (20:48 +0100)
committerStephan Witt <switt@lyx.org>
Fri, 20 Nov 2015 19:48:56 +0000 (20:48 +0100)
src/TexRow.cpp

index 37e5f64c21a1918f169b3903f29241df4938d022..8586a81c41d8fbaac884176d327a02cb8a951d77 100644 (file)
@@ -475,7 +475,7 @@ docstring TexRow::asString(RowEntry const & entry)
 ///prepends the texrow to the source given by tex, for debugging purpose
 void TexRow::prepend(docstring_list & tex) const
 {
-       int const prefix_length = 25;
+       size_type const prefix_length = 25;
        if (tex.size() < rowlist_.size())
                tex.resize(rowlist_.size());
        std::vector<RowEntryList>::const_iterator it = rowlist_.begin();
@@ -489,7 +489,7 @@ void TexRow::prepend(docstring_list & tex) const
                        entry += asString(*it2);
                if (entry.length() < prefix_length)
                        entry = entry + docstring(prefix_length - entry.length(), L' ');
-               int i = it - beg;
+               ptrdiff_t i = it - beg;
                tex[i] = entry + "  " + tex[i];
        }
 }