]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathParser.cpp
Removed unused private variable
[lyx.git] / src / mathed / MathParser.cpp
index 35062caefe3a3c69cbe75c5f522f64641ec499a7..9a2275d91348b48e684f44ec3f5c4f400f1dd331 100644 (file)
@@ -745,7 +745,7 @@ docstring Parser::parse_verbatim_option()
        docstring res;
        if (nextToken().character() == '[') {
                Token t = getToken();
-               for (Token t = getToken(); t.character() != ']' && good(); t = getToken()) {
+               for (t = getToken(); t.character() != ']' && good(); t = getToken()) {
                        if (t.cat() == catBegin) {
                                putback();
                                res += '{' + parse_verbatim_item() + '}';
@@ -763,7 +763,7 @@ docstring Parser::parse_verbatim_item()
        docstring res;
        if (nextToken().cat() == catBegin) {
                Token t = getToken();
-               for (Token t = getToken(); t.cat() != catEnd && good(); t = getToken()) {
+               for (t = getToken(); t.cat() != catEnd && good(); t = getToken()) {
                        if (t.cat() == catBegin) {
                                putback();
                                res += '{' + parse_verbatim_item() + '}';
@@ -1037,10 +1037,10 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags,
                else if (t.cat() == catComment) {
                        docstring s;
                        while (good()) {
-                               Token const & t = getToken();
-                               if (t.cat() == catNewline)
+                               Token const & tt = getToken();
+                               if (tt.cat() == catNewline)
                                        break;
-                               s += t.asInput();
+                               s += tt.asInput();
                        }
                        cell->push_back(MathAtom(new InsetMathComment(buf, s)));
                        skipSpaces();
@@ -1774,7 +1774,7 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags,
                        docstring s;
                        int num_tokens = 0;
                        while (true) {
-                               Token const & t = getToken();
+                               Token const & tt = getToken();
                                ++num_tokens;
                                if (!good()) {
                                        s.clear();
@@ -1782,7 +1782,7 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags,
                                                putback();
                                        break;
                                }
-                               s += t.character();
+                               s += tt.character();
                                if (isValidLength(to_utf8(s)))
                                        break;
                        }
@@ -2000,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();
                                        }
                                }