From 30bdb9a0e446350846fc0cac82b8a22c4bdd983f Mon Sep 17 00:00:00 2001 From: Renaud G Date: Thu, 5 May 2016 16:15:14 +0200 Subject: -remove default dice for keep operator, alias are better solution to that aim. --- diceparser.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'diceparser.cpp') diff --git a/diceparser.cpp b/diceparser.cpp index f88cfc3..7e75db2 100644 --- a/diceparser.cpp +++ b/diceparser.cpp @@ -257,7 +257,7 @@ bool DiceParser::readNode(QString& str,ExecutionNode* & node) JumpBackwardNode* jumpNode = new JumpBackwardNode(); node = jumpNode; str=str.remove(0,1); - readOption(str,jumpNode,true); + readOption(str,jumpNode); return true; } return false; @@ -760,7 +760,7 @@ bool DiceParser::readOperator(QString& str,ExecutionNode* previous) } else { - while(readOption(str,previous,false)) + while(readOption(str,previous)) { previous = getLatestNode(previous); } @@ -788,7 +788,7 @@ ExploseDiceNode* DiceParser::addExploseDiceNode(qint64 value,ExecutionNode* prev previous->setNextNode(exploseDiceNode); return exploseDiceNode; } -bool DiceParser::readOption(QString& str,ExecutionNode* previous, bool hasDice)//, +bool DiceParser::readOption(QString& str,ExecutionNode* previous)//, { if(str.isEmpty()) { @@ -815,10 +815,10 @@ bool DiceParser::readOption(QString& str,ExecutionNode* previous, bool hasDice)/ bool ascending = m_parsingToolbox->readAscending(str); if(m_parsingToolbox->readNumber(str,myNumber)) { - if(!hasDice) + /* if(!hasDice) { previous = addRollDiceNode(DEFAULT_FACES_NUMBER,previous); - } + }*/ node = m_parsingToolbox->addSort(previous,ascending); KeepDiceExecNode* nodeK = new KeepDiceExecNode(); @@ -836,10 +836,10 @@ bool DiceParser::readOption(QString& str,ExecutionNode* previous, bool hasDice)/ bool ascending = m_parsingToolbox->readAscending(str); if(m_parsingToolbox->readNumber(str,myNumber)) { - if(!hasDice) + /* if(!hasDice) { previous = addRollDiceNode(DEFAULT_FACES_NUMBER,previous); - } + }*/ DiceRollerNode* nodeTmp = dynamic_cast(previous); if(NULL!=nodeTmp) { -- cgit v1.2.3-70-g09d2