From cedc70618afa6826d409a64078ea1a8ede4af06c Mon Sep 17 00:00:00 2001 From: Renaud G Date: Sat, 11 Nov 2017 18:51:13 +0100 Subject: -replace NULL to nullptr. --- node/countexecutenode.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'node/countexecutenode.cpp') diff --git a/node/countexecutenode.cpp b/node/countexecutenode.cpp index 1f78fd2..84946df 100644 --- a/node/countexecutenode.cpp +++ b/node/countexecutenode.cpp @@ -4,7 +4,7 @@ CountExecuteNode::CountExecuteNode() - : m_scalarResult(new ScalarResult()),m_validator(NULL) + : m_scalarResult(new ScalarResult()),m_validator(nullptr) { m_result = m_scalarResult; } @@ -14,7 +14,7 @@ void CountExecuteNode::setValidator(Validator* validator) } CountExecuteNode::~CountExecuteNode() { - if(NULL!=m_validator) + if(nullptr!=m_validator) { delete m_validator; } @@ -23,19 +23,19 @@ CountExecuteNode::~CountExecuteNode() void CountExecuteNode::run(ExecutionNode *previous) { m_previousNode = previous; - if(NULL==previous) + if(nullptr==previous) { return; } DiceResult* previousResult = dynamic_cast(previous->getResult()); - if(NULL!=previousResult) + if(nullptr!=previousResult) { m_result->setPrevious(previousResult); QList diceList=previousResult->getResultList(); qint64 sum = 0; foreach(Die* dice,diceList) { - if(NULL!=m_validator) + if(nullptr!=m_validator) { sum+=m_validator->hasValid(dice,true,true); } @@ -43,7 +43,7 @@ void CountExecuteNode::run(ExecutionNode *previous) m_scalarResult->setValue(sum); - if(NULL!=m_nextNode) + if(nullptr!=m_nextNode) { m_nextNode->run(this); } @@ -63,7 +63,7 @@ QString CountExecuteNode::toString(bool withlabel) const qint64 CountExecuteNode::getPriority() const { qint64 priority=0; - if(NULL!=m_nextNode) + if(nullptr!=m_nextNode) { priority = m_nextNode->getPriority(); } @@ -75,11 +75,11 @@ qint64 CountExecuteNode::getPriority() const ExecutionNode* CountExecuteNode::getCopy() const { CountExecuteNode* node = new CountExecuteNode(); - if(NULL!=m_validator) + if(nullptr!=m_validator) { node->setValidator(m_validator->getCopy()); } - if(NULL!=m_nextNode) + if(nullptr!=m_nextNode) { node->setNextNode(m_nextNode->getCopy()); } -- cgit v1.2.3-70-g09d2