From f053853e87624a045438bacd4dd1494e91ae381f Mon Sep 17 00:00:00 2001 From: Renaud G Date: Fri, 27 Oct 2017 22:19:20 +0200 Subject: -c++11 update about for and nullptr. --- node/dicerollernode.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'node/dicerollernode.cpp') diff --git a/node/dicerollernode.cpp b/node/dicerollernode.cpp index 89ba24d..25b9d5a 100644 --- a/node/dicerollernode.cpp +++ b/node/dicerollernode.cpp @@ -17,10 +17,10 @@ DiceRollerNode::DiceRollerNode(qint64 max,qint64 min) void DiceRollerNode::run(ExecutionNode* previous) { m_previousNode = previous; - if(NULL!=previous) + if(nullptr!=previous) { Result* result=previous->getResult(); - if(NULL!=result) + if(nullptr!=result) { m_diceCount = result->getResult(Result::SCALAR).toReal(); m_result->setPrevious(result); @@ -40,7 +40,7 @@ void DiceRollerNode::run(ExecutionNode* previous) //qDebug() << die->getValue() << "value"; m_diceResult->insertResult(die); } - if(NULL!=m_nextNode) + if(nullptr!=m_nextNode) { m_nextNode->run(this); } @@ -66,18 +66,16 @@ QString DiceRollerNode::toString(bool wl) const qint64 DiceRollerNode::getPriority() const { qint64 priority=4; -// if(NULL!=m_nextNode) +// if(nullptr!=m_nextNode) // { // priority = m_nextNode->getPriority(); // } - - return priority; } ExecutionNode* DiceRollerNode::getCopy() const { DiceRollerNode* node = new DiceRollerNode(m_max,m_min); - if(NULL!=m_nextNode) + if(nullptr!=m_nextNode) { node->setNextNode(m_nextNode->getCopy()); } -- cgit v1.2.3-70-g09d2