]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathParser.cpp
Removed unused private variable
[lyx.git] / src / mathed / MathParser.cpp
index c914a6a55da64f7c08baaf2b3573fbbdc9d85479..9a2275d91348b48e684f44ec3f5c4f400f1dd331 100644 (file)
@@ -744,7 +744,8 @@ docstring Parser::parse_verbatim_option()
        skipSpaces();
        docstring res;
        if (nextToken().character() == '[') {
-               for (Token t = getToken(); t.character() != ']' && good(); t = getToken()) {
+               Token t = getToken();
+               for (t = getToken(); t.character() != ']' && good(); t = getToken()) {
                        if (t.cat() == catBegin) {
                                putback();
                                res += '{' + parse_verbatim_item() + '}';
@@ -761,7 +762,8 @@ docstring Parser::parse_verbatim_item()
        skipSpaces();
        docstring res;
        if (nextToken().cat() == catBegin) {
-               for (Token t = getToken(); t.cat() != catEnd && good(); t = getToken()) {
+               Token t = getToken();
+               for (t = getToken(); t.cat() != catEnd && good(); t = getToken()) {
                        if (t.cat() == catBegin) {
                                putback();
                                res += '{' + parse_verbatim_item() + '}';
@@ -1998,7 +2000,10 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags,
                                                        new InsetMathBig(t.cs(), delim)));
                                        else {
                                                cell->push_back(createInsetMath(t.cs(), buf));
-                                               putback();
+                                               // For some reason delim.empty()
+                                               // is always false here
+                                               if (delim.at(0))
+                                                       putback();
                                        }
                                }