aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/cli/main.cpp
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2016-09-16 20:35:11 +0200
committerRenaud G <renaud@rolisteam.org>2016-09-16 20:35:11 +0200
commit70e09294fca1022d9370fe2fd631a98480c284b2 (patch)
tree4b09bfeed97a10ae19bede3f1c7eafafb2cdfcb0 /cli/main.cpp
parent92e415fa59bb1508bbbd93905dbe225d4202d571 (diff)
downloadOneRoll-70e09294fca1022d9370fe2fd631a98480c284b2.tar.gz
OneRoll-70e09294fca1022d9370fe2fd631a98480c284b2.zip
-Fix some value on diceparser.
Diffstat (limited to 'cli/main.cpp')
-rw-r--r--cli/main.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/cli/main.cpp b/cli/main.cpp
index 21bb1ca..64f01ab 100644
--- a/cli/main.cpp
+++ b/cli/main.cpp
@@ -116,8 +116,7 @@ void startDiceParsing(QString& cmd,QString& treeFile,bool highlight)
if(parser->parseLine(cmd))
{
//
- if(treeFile.isEmpty())
- {
+
parser->Start();
if(!parser->getErrorMap().isEmpty())
{
@@ -150,11 +149,10 @@ void startDiceParsing(QString& cmd,QString& treeFile,bool highlight)
str = parser->getStringResult();
}
out << str << "\n";
- }
- else
- {
- parser->writeDownDotTree(treeFile);
- }
+ if(!treeFile.isEmpty())
+ {
+ parser->writeDownDotTree(treeFile);
+ }
}
else
{