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/stringnode.cpp | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) (limited to 'node/stringnode.cpp') diff --git a/node/stringnode.cpp b/node/stringnode.cpp index 8f9796d..78b270a 100644 --- a/node/stringnode.cpp +++ b/node/stringnode.cpp @@ -1,19 +1,18 @@ #include "stringnode.h" -StringNode::StringNode() - : m_stringResult(new StringResult()) +StringNode::StringNode() : m_stringResult(new StringResult()) { - m_result = m_stringResult; + m_result= m_stringResult; } -void StringNode::run(ExecutionNode *previous) +void StringNode::run(ExecutionNode* previous) { - m_previousNode = previous; - if(nullptr!=previous) + m_previousNode= previous; + if(nullptr != previous) { m_result->setPrevious(previous->getResult()); } - if(nullptr!=m_nextNode) + if(nullptr != m_nextNode) { m_nextNode->run(this); } @@ -21,16 +20,16 @@ void StringNode::run(ExecutionNode *previous) void StringNode::setString(QString str) { - m_data = str; + m_data= str; m_stringResult->setText(m_data); } QString StringNode::toString(bool withLabel) const { if(withLabel) { - QString dataCopy = m_data; + QString dataCopy= m_data; - return QString("%1 [label=\"StringNode %2\"]").arg(m_id, dataCopy.replace('%','\\')); + return QString("%1 [label=\"StringNode %2\"]").arg(m_id, dataCopy.replace('%', '\\')); } else { @@ -39,21 +38,20 @@ QString StringNode::toString(bool withLabel) const } qint64 StringNode::getPriority() const { - qint64 priority=0; - if(nullptr!=m_nextNode) + qint64 priority= 0; + if(nullptr != m_nextNode) { - priority = m_nextNode->getPriority(); + priority= m_nextNode->getPriority(); } return priority; } ExecutionNode* StringNode::getCopy() const { - StringNode* node = new StringNode(); + StringNode* node= new StringNode(); node->setString(m_data); - if(nullptr!=m_nextNode) + if(nullptr != m_nextNode) { node->setNextNode(m_nextNode->getCopy()); } return node; - } -- cgit v1.2.3-70-g09d2