]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathGrid.cpp
Only set buffer if it is not null.
[lyx.git] / src / mathed / InsetMathGrid.cpp
index 3de72abcb194cd9dedb022fc108871d345a0977a..783e374f624492c6c8e5e9bd51b49117c2abea97 100644 (file)
@@ -281,9 +281,9 @@ void InsetMathGrid::setHorizontalAlignments(docstring const & hh)
 InsetMathGrid::col_type InsetMathGrid::guessColumns(docstring const & hh)
 {
        col_type col = 0;
-       for (docstring::const_iterator it = hh.begin(); it != hh.end(); ++it)
-               if (*it == 'c' || *it == 'l' || *it == 'r'||
-                   *it == 'p' || *it == 'm' || *it == 'b')
+       for (char_type const c : hh)
+               if (c == 'c' || c == 'l' || c == 'r'||
+                   c == 'p' || c == 'm' || c == 'b')
                        ++col;
        // let's have at least one column, even if we did not recognize its
        // alignment
@@ -1215,7 +1215,7 @@ void InsetMathGrid::mathmlize(MathStream & ms) const
 
 // FIXME XHTML
 // We need to do something about alignment here.
-void InsetMathGrid::htmlize(HtmlStream & os, string attrib) const
+void InsetMathGrid::htmlize(HtmlStream & os, string const & attrib) const
 {
        bool const havetable = nrows() > 1 || ncols() > 1;
        if (!havetable) {