From f2051fb35b1ad49c4d940e6fbba2acc98b216e13 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Tue, 12 Feb 2019 23:59:24 +0100 Subject: clang format --- node/executionnode.cpp | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) (limited to 'node/executionnode.cpp') diff --git a/node/executionnode.cpp b/node/executionnode.cpp index 5b001fb..5bee091 100644 --- a/node/executionnode.cpp +++ b/node/executionnode.cpp @@ -3,21 +3,24 @@ #include ExecutionNode::ExecutionNode() - : m_previousNode(nullptr),m_result(nullptr),m_nextNode(nullptr),m_errors(QMap()),m_id(QString("\"%1\"").arg(QUuid::createUuid().toString())) + : m_previousNode(nullptr) + , m_result(nullptr) + , m_nextNode(nullptr) + , m_errors(QMap()) + , m_id(QString("\"%1\"").arg(QUuid::createUuid().toString())) { - } ExecutionNode::~ExecutionNode() { - if(nullptr!=m_result) + if(nullptr != m_result) { delete m_result; - m_result = nullptr; + m_result= nullptr; } - if(nullptr!=m_nextNode) + if(nullptr != m_nextNode) { delete m_nextNode; - m_nextNode = nullptr; + m_nextNode= nullptr; } } @@ -27,24 +30,24 @@ Result* ExecutionNode::getResult() } void ExecutionNode::setNextNode(ExecutionNode* node) { - m_nextNode = node; + m_nextNode= node; } void ExecutionNode::setPreviousNode(ExecutionNode* node) { - m_previousNode = node; + m_previousNode= node; } ExecutionNode* ExecutionNode::getNextNode() { return m_nextNode; } -QMap ExecutionNode::getExecutionErrorMap() +QMap ExecutionNode::getExecutionErrorMap() { - if(nullptr!=m_nextNode) + if(nullptr != m_nextNode) { - auto const& keys = m_nextNode->getExecutionErrorMap().keys(); - for(auto& key: keys) + auto const& keys= m_nextNode->getExecutionErrorMap().keys(); + for(auto& key : keys) { - m_errors.insert(key,m_nextNode->getExecutionErrorMap().value(key)); + m_errors.insert(key, m_nextNode->getExecutionErrorMap().value(key)); } } return m_errors; @@ -59,13 +62,13 @@ ExecutionNode* ExecutionNode::getPreviousNode() const } void ExecutionNode::generateDotTree(QString& s) { - auto str = toString(true); + auto str= toString(true); if(s.contains(str)) return; s.append(toString(true)); s.append(";\n"); - if(nullptr!=m_nextNode) + if(nullptr != m_nextNode) { s.append(toString(false)); s.append(" -> "); @@ -80,7 +83,7 @@ void ExecutionNode::generateDotTree(QString& s) s.append(" -> "); s.append("nullptr;\n"); } - if(nullptr!=m_result) + if(nullptr != m_result) { s.append(toString(false)); s.append(" ->"); @@ -89,7 +92,6 @@ void ExecutionNode::generateDotTree(QString& s) if(nullptr == m_nextNode) m_result->generateDotTree(s); } - } qint64 ExecutionNode::getScalarResult() { -- cgit v1.2.3-70-g09d2