aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/node/executionnode.cpp
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2017-10-27 22:19:20 +0200
committerRenaud G <renaud@rolisteam.org>2017-10-29 03:30:46 +0100
commitf053853e87624a045438bacd4dd1494e91ae381f (patch)
treecbf98ae65d48f4158c3af73be6bd0a1fb9417335 /node/executionnode.cpp
parenta543a6ca8ddc2826a4433044ed1a040acbbf36a3 (diff)
downloadOneRoll-f053853e87624a045438bacd4dd1494e91ae381f.tar.gz
OneRoll-f053853e87624a045438bacd4dd1494e91ae381f.zip
-c++11 update about for and nullptr.
Diffstat (limited to 'node/executionnode.cpp')
-rw-r--r--node/executionnode.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/node/executionnode.cpp b/node/executionnode.cpp
index c8c62f2..94d0d46 100644
--- a/node/executionnode.cpp
+++ b/node/executionnode.cpp
@@ -3,21 +3,21 @@
#include <QUuid>
ExecutionNode::ExecutionNode()
- : m_previousNode(NULL),m_result(NULL),m_nextNode(NULL),m_errors(QMap<ExecutionNode::DICE_ERROR_CODE,QString>()),m_id(QString("\"%1\"").arg(QUuid::createUuid().toString()))
+ : m_previousNode(nullptr),m_result(nullptr),m_nextNode(nullptr),m_errors(QMap<ExecutionNode::DICE_ERROR_CODE,QString>()),m_id(QString("\"%1\"").arg(QUuid::createUuid().toString()))
{
}
ExecutionNode::~ExecutionNode()
{
- if(NULL!=m_result)
+ if(nullptr!=m_result)
{
delete m_result;
- m_result = NULL;
+ m_result = nullptr;
}
- if(NULL!=m_nextNode)
+ if(nullptr!=m_nextNode)
{
delete m_nextNode;
- m_nextNode = NULL;
+ m_nextNode = nullptr;
}
}
@@ -39,9 +39,9 @@ ExecutionNode* ExecutionNode::getNextNode()
}
QMap<ExecutionNode::DICE_ERROR_CODE,QString> ExecutionNode::getExecutionErrorMap()
{
- if(NULL!=m_nextNode)
+ if(nullptr!=m_nextNode)
{
- foreach (ExecutionNode::DICE_ERROR_CODE key, m_nextNode->getExecutionErrorMap().keys())
+ for (const auto& key : m_nextNode->getExecutionErrorMap().keys())
{
m_errors.insert(key,m_nextNode->getExecutionErrorMap().value(key));
}
@@ -61,7 +61,7 @@ void ExecutionNode::generateDotTree(QString& s)
s.append(toString(true));
s.append(";\n");
- if(NULL!=m_nextNode)
+ if(nullptr!=m_nextNode)
{
s.append(toString(false));
s.append(" -> ");
@@ -74,8 +74,8 @@ void ExecutionNode::generateDotTree(QString& s)
{
s.append(toString(false));
s.append(" -> ");
- s.append("NULL;\n");
- if(NULL!=m_result)
+ s.append("nullptr;\n");
+ if(nullptr!=m_result)
{
s.append(toString(false));