diff options
| author | 2015-08-28 08:35:33 +0200 | |
|---|---|---|
| committer | 2015-08-28 08:35:33 +0200 | |
| commit | da1db7bc2436f94ab288d8da8d98a8209d3d2caa (patch) | |
| tree | 36ef8347fd70144dbd8bbef7d41365a8c31f1a06 /diceparser.cpp | |
| parent | 41b9202ef9102cb94e5b3fdcf8ce760509abaa49 (diff) | |
| download | OneRoll-da1db7bc2436f94ab288d8da8d98a8209d3d2caa.tar.gz OneRoll-da1db7bc2436f94ab288d8da8d98a8209d3d2caa.zip | |
fix cppcheck issue
Diffstat (limited to 'diceparser.cpp')
| -rw-r--r-- | diceparser.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/diceparser.cpp b/diceparser.cpp index 8c910a2..bfe8247 100644 --- a/diceparser.cpp +++ b/diceparser.cpp @@ -42,7 +42,7 @@ #define DEFAULT_FACES_NUMBER 10 DiceParser::DiceParser() - : m_start(NULL) + : m_start(NULL),m_current(NULL) { m_parsingToolbox = new ParsingToolBox(); @@ -166,7 +166,8 @@ bool DiceParser::parseLine(QString str) keepParsing =!str.isEmpty(); if(keepParsing) { - keepParsing = readOperator(str,m_current); + // keepParsing = + readOperator(str,m_current); m_current = getLatestNode(m_current); } @@ -428,7 +429,6 @@ void DiceParser::getLastDiceResult(ExportedDiceResult& diceValues) DiceResult* diceResult = dynamic_cast<DiceResult*>(result); if(NULL!=diceResult) { - bool hasResult = false; quint64 face=0; ListDiceResult listpair; foreach(Die* die, diceResult->getResultList()) @@ -436,7 +436,6 @@ void DiceParser::getLastDiceResult(ExportedDiceResult& diceValues) if(!die->hasBeenDisplayed()) { QList<quint64> valuesResult; - hasResult=true; valuesResult.append(die->getValue()); die->displayed(); face = die->getFaces(); @@ -545,10 +544,10 @@ bool DiceParser::readDice(QString& str,ExecutionNode* & node) if(readDiceOperator(str,currentOperator)) { - int num; - int end; if(currentOperator==D) { + int num; + int end; if(m_parsingToolbox->readNumber(str,num)) { if(num<1) @@ -837,7 +836,8 @@ bool DiceParser::readOption(QString& str,ExecutionNode* previous, bool hasDice)/ if(NULL!=validator) { /// @todo display warning here. - bool b = m_parsingToolbox->isValidValidator(previous,validator); + //bool b = + m_parsingToolbox->isValidValidator(previous,validator); CountExecuteNode* countNode = new CountExecuteNode(); countNode->setValidator(validator); @@ -859,7 +859,8 @@ bool DiceParser::readOption(QString& str,ExecutionNode* previous, bool hasDice)/ if(NULL!=validator) { /// @todo display warning here. - bool b = m_parsingToolbox->isValidValidator(previous,validator); + //bool b = + m_parsingToolbox->isValidValidator(previous,validator); RerollDiceNode* rerollNode = new RerollDiceNode(); if(m_OptionOp->value(tmp)==RerollAndAdd) { |