aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/node/explosedicenode.cpp
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2017-11-12 16:28:40 +0100
committerRenaud G <renaud@rolisteam.org>2017-11-12 16:28:40 +0100
commit2a8fd91924799e713c79f8a8e7d9edc94574a6ca (patch)
tree6af720571119ef395a39fe3f6fff5d52ce09e3cf /node/explosedicenode.cpp
parentcedc70618afa6826d409a64078ea1a8ede4af06c (diff)
parentbbc6f032bf8f182e6e4e97c7afddf47a3fb8a911 (diff)
downloadOneRoll-2a8fd91924799e713c79f8a8e7d9edc94574a6ca.tar.gz
OneRoll-2a8fd91924799e713c79f8a8e7d9edc94574a6ca.zip
update diceparser
Diffstat (limited to 'node/explosedicenode.cpp')
-rw-r--r--node/explosedicenode.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/node/explosedicenode.cpp b/node/explosedicenode.cpp
index 96caaeb..81e80ee 100644
--- a/node/explosedicenode.cpp
+++ b/node/explosedicenode.cpp
@@ -1,18 +1,18 @@
#include "explosedicenode.h"
ExploseDiceNode::ExploseDiceNode()
- : m_diceResult(new DiceResult()),m_validator(nullptr)
+ : m_diceResult(new DiceResult()),m_validator(nullptr)
{
m_result = m_diceResult;
}
void ExploseDiceNode::run(ExecutionNode* previous)
{
m_previousNode = previous;
- if((nullptr!=previous)&&(nullptr!=previous->getResult()))
+ if((NULL!=previous)&&(NULL!=previous->getResult()))
{
DiceResult* previous_result = static_cast<DiceResult*>(previous->getResult());
m_result->setPrevious(previous_result);
- if(nullptr!=previous_result)
+ if(NULL!=previous_result)
{
foreach(Die* die,previous_result->getResultList())
{
@@ -34,7 +34,7 @@ void ExploseDiceNode::run(ExecutionNode* previous)
}
// m_diceResult->setResultList(list);
- if(nullptr!=m_nextNode)
+ if(NULL!=m_nextNode)
{
m_nextNode->run(this);
}
@@ -43,7 +43,7 @@ void ExploseDiceNode::run(ExecutionNode* previous)
}
ExploseDiceNode::~ExploseDiceNode()
{
- if(nullptr!=m_validator)
+ if(nullptr!=m_validator)
{
delete m_validator;
}
@@ -66,7 +66,7 @@ QString ExploseDiceNode::toString(bool withlabel) const
qint64 ExploseDiceNode::getPriority() const
{
qint64 priority=0;
- if(nullptr!=m_nextNode)
+ if(nullptr!=m_previousNode)
{
priority = m_nextNode->getPriority();
}
@@ -78,11 +78,11 @@ qint64 ExploseDiceNode::getPriority() const
ExecutionNode* ExploseDiceNode::getCopy() const
{
ExploseDiceNode* node = new ExploseDiceNode();
- if(nullptr!=m_validator)
+ if(NULL!=m_validator)
{
node->setValidator(m_validator->getCopy());
}
- if(nullptr!=m_nextNode)
+ if(NULL!=m_nextNode)
{
node->setNextNode(m_nextNode->getCopy());
}