aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/cli
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2019-07-28 01:01:48 +0200
committerRenaud G <renaud@rolisteam.org>2019-07-28 01:01:48 +0200
commitdee4f259c8372dea752ccd222800dfba82372246 (patch)
treed32c47dcec8b5a497831bf993dc906355d03dc26 /cli
parent0a059fd7f9721d74dad7d0a11f6d8a16db1717ee (diff)
downloadOneRoll-dee4f259c8372dea752ccd222800dfba82372246.tar.gz
OneRoll-dee4f259c8372dea752ccd222800dfba82372246.zip
Clean the memory after execution.
Diffstat (limited to 'cli')
-rw-r--r--cli/main.cpp9
1 files changed, 3 insertions, 6 deletions
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 <QTextCodec>