diff options
| author | 2014-01-30 12:00:11 +0100 | |
|---|---|---|
| committer | 2014-01-30 12:00:11 +0100 | |
| commit | 1e25fd75fa4dd456d603b232a393c0e40363ce12 (patch) | |
| tree | 3b8d9aced121168df54e207e2a2deb9944874158 /node/scalaroperatornode.cpp | |
| parent | a1ffda3c8db7b97ae3041b19ee28cf3b3e2d36f8 (diff) | |
| download | OneRoll-1e25fd75fa4dd456d603b232a393c0e40363ce12.tar.gz OneRoll-1e25fd75fa4dd456d603b232a393c0e40363ce12.zip | |
Update scalaroperatornode.cpp
getPriority
Diffstat (limited to 'node/scalaroperatornode.cpp')
| -rw-r--r-- | node/scalaroperatornode.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/node/scalaroperatornode.cpp b/node/scalaroperatornode.cpp index 076e3b3..d08532c 100644 --- a/node/scalaroperatornode.cpp +++ b/node/scalaroperatornode.cpp @@ -18,10 +18,9 @@ ScalarOperatorNode::ScalarOperatorNode() void ScalarOperatorNode::run(ExecutionNode* previous) { - if(NULL!=m_internalNode) { - m_internalNode->run(this); + m_internalNode->run(this); } if(NULL!=previous) { @@ -30,17 +29,16 @@ void ScalarOperatorNode::run(ExecutionNode* previous) if(NULL!=previousResult) { ExecutionNode* internal = m_internalNode; - while(NULL != internal->getNextNode() ) - { - internal = internal->getNextNode(); - } + while(NULL != internal->getNextNode() ) + { + internal = internal->getNextNode(); + } + Result* internalResult = internal->getResult(); m_result->setPrevious(internalResult); m_internalNode->getResult()->setPrevious(previousResult); - //qDebug() << "ScalarOperatorNode node" << m_myOperator; - switch(m_myOperator) { case PLUS: @@ -106,3 +104,10 @@ QString ScalarOperatorNode::toString() const { return "ScalarOperatorNode"; } +qint64 ScalarOperatorNode::getPriority() const +{ + if((m_myOperator==PLUS)||(m_myOperator==MINUS)) + return 1; + else + return 2; +} |