diff options
| author | 2019-07-28 01:01:48 +0200 | |
|---|---|---|
| committer | 2019-07-28 01:01:48 +0200 | |
| commit | dee4f259c8372dea752ccd222800dfba82372246 (patch) | |
| tree | d32c47dcec8b5a497831bf993dc906355d03dc26 /cli | |
| parent | 0a059fd7f9721d74dad7d0a11f6d8a16db1717ee (diff) | |
| download | OneRoll-dee4f259c8372dea752ccd222800dfba82372246.tar.gz OneRoll-dee4f259c8372dea752ccd222800dfba82372246.zip | |
Clean the memory after execution.
Diffstat (limited to 'cli')
| -rw-r--r-- | cli/main.cpp | 9 |
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> |