diff options
| author | 2016-05-05 16:15:14 +0200 | |
|---|---|---|
| committer | 2016-05-05 16:15:14 +0200 | |
| commit | 30bdb9a0e446350846fc0cac82b8a22c4bdd983f (patch) | |
| tree | baed36d26b589aac341d78294061240a108dfdc8 | |
| parent | ee3cc6726675134a8522d00cfd9176b3a169b0cd (diff) | |
| download | OneRoll-30bdb9a0e446350846fc0cac82b8a22c4bdd983f.tar.gz OneRoll-30bdb9a0e446350846fc0cac82b8a22c4bdd983f.zip | |
-remove default dice for keep operator, alias are better solution to
that aim.
| -rw-r--r-- | diceparser.cpp | 14 | ||||
| -rw-r--r-- | diceparser.h | 2 |
2 files changed, 8 insertions, 8 deletions
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<DiceRollerNode*>(previous); if(NULL!=nodeTmp) { diff --git a/diceparser.h b/diceparser.h index b532b3e..59fe04f 100644 --- a/diceparser.h +++ b/diceparser.h @@ -249,7 +249,7 @@ private: /** * @brief readOption */ - bool readOption(QString&,ExecutionNode* node, bool hasDice = true);//OptionOperator& option, + bool readOption(QString&,ExecutionNode* node);//OptionOperator& option, /** * @brief addRollDiceNode |