aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/node/sortresult.cpp
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2017-11-23 17:26:13 +0100
committerRenaud G <renaud@rolisteam.org>2017-11-23 17:26:13 +0100
commit4eac628e2a9eadb08e2c9e673a6f41aea7a58205 (patch)
treec32dc378d1f4f0fbfcfd5115d67b1d375f861fa4 /node/sortresult.cpp
parent95db07d62e7f9808ce3ed42335c5175db0f10f11 (diff)
parentddf524d6f0de517551d21e73b81abdf724a9ca35 (diff)
downloadOneRoll-4eac628e2a9eadb08e2c9e673a6f41aea7a58205.tar.gz
OneRoll-4eac628e2a9eadb08e2c9e673a6f41aea7a58205.zip
Merge branch 'master' of github.com:Rolisteam/DiceParser
Diffstat (limited to 'node/sortresult.cpp')
-rw-r--r--node/sortresult.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/node/sortresult.cpp b/node/sortresult.cpp
index e3d8d1e..062e1d2 100644
--- a/node/sortresult.cpp
+++ b/node/sortresult.cpp
@@ -57,7 +57,7 @@ void SortResultNode::run(ExecutionNode* node)
bool found = false;
int start = 0;
int end = diceList2.size();
- Die* tmp2 = nullptr;
+ Die* tmp2 = NULL;
while(!found)
{
int distance = end-start;
@@ -92,7 +92,7 @@ void SortResultNode::run(ExecutionNode* node)
}
m_diceResult->setResultList(diceList2);
- if(nullptr!=m_nextNode)
+ if(NULL!=m_nextNode)
{
m_nextNode->run(this);
}
@@ -125,17 +125,20 @@ qint64 SortResultNode::getPriority() const
qint64 priority=0;
if(nullptr != m_previousNode)
{
- priority = m_previousNode->getPriority();
+ priority = m_nextNode->getPriority();
}
+
+
return priority;
}
ExecutionNode* SortResultNode::getCopy() const
{
SortResultNode* node = new SortResultNode();
node->setSortAscending(m_ascending);
- if(nullptr!=m_nextNode)
+ if(NULL!=m_nextNode)
{
node->setNextNode(m_nextNode->getCopy());
}
return node;
+
}