From dee4f259c8372dea752ccd222800dfba82372246 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Sun, 28 Jul 2019 01:01:48 +0200 Subject: Clean the memory after execution. --- cli/main.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'cli/main.cpp') diff --git a/cli/main.cpp b/cli/main.cpp index 958d96f..c597dea 100644 --- a/cli/main.cpp +++ b/cli/main.cpp @@ -367,11 +367,6 @@ int startDiceParsing(QStringList& cmds, QString& treeFile, bool withColor, EXPOR stringResult.replace("\\n", "\n"); stringResult= ParsingToolBox::replaceVariableToValue(stringResult, strLst); - /*for(auto it= strLst.rbegin(); it != strLst.rend(); ++it) - { - stringResult.replace(QStringLiteral("$%1").arg(i), (*it)); - --i; - }*/ int i= strLst.size(); for(auto it= strLst.rbegin(); it != strLst.rend(); ++it) @@ -441,10 +436,12 @@ int startDiceParsing(QStringList& cmds, QString& treeFile, bool withColor, EXPOR } else { + QString error= parser.humanReadableError(); + err << "Error: " << error << "\n"; rt= 1; } } - + parser.cleanAll(); return rt; } #include -- cgit v1.2.3-70-g09d2