aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/node/mergenode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'node/mergenode.cpp')
-rw-r--r--node/mergenode.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/node/mergenode.cpp b/node/mergenode.cpp
index 5145bc8..7f3bec0 100644
--- a/node/mergenode.cpp
+++ b/node/mergenode.cpp
@@ -32,26 +32,26 @@ void MergeNode::run(ExecutionNode* previous)
if(NULL!=previous)
{
m_result->setPrevious(previous->getResult());
- }
- Result* tmpResult = previous->getResult();
- while(NULL!=tmpResult)
- {
- DiceResult* dice = dynamic_cast<DiceResult*>(tmpResult);
- if(NULL!=dice)
+
+ Result* tmpResult = previous->getResult();
+ while(NULL!=tmpResult)
{
- ///@todo improve here to set homogeneous while is really
- m_diceResult->setHomogeneous(false);
- foreach(Die* die, dice->getResultList())
+ DiceResult* dice = dynamic_cast<DiceResult*>(tmpResult);
+ if(NULL!=dice)
{
- if(!m_diceResult->getResultList().contains(die))
+ ///@todo improve here to set homogeneous while is really
+ m_diceResult->setHomogeneous(false);
+ foreach(Die* die, dice->getResultList())
{
- m_diceResult->getResultList().append(die);
+ if(!m_diceResult->getResultList().contains(die))
+ {
+ m_diceResult->getResultList().append(die);
+ }
}
}
+ tmpResult = tmpResult->getPrevious();
}
- tmpResult = tmpResult->getPrevious();
}
-
if(NULL!=m_nextNode)
{
m_nextNode->run(this);