diff options
Diffstat (limited to 'node')
| -rw-r--r-- | node/dicerollernode.cpp | 2 | ||||
| -rw-r--r-- | node/ifnode.cpp | 6 | ||||
| -rw-r--r-- | node/numbernode.cpp | 2 | ||||
| -rw-r--r-- | node/startingnode.cpp | 18 |
4 files changed, 14 insertions, 14 deletions
diff --git a/node/dicerollernode.cpp b/node/dicerollernode.cpp index ed6d102..5a2ea04 100644 --- a/node/dicerollernode.cpp +++ b/node/dicerollernode.cpp @@ -38,7 +38,7 @@ void DiceRollerNode::run(ExecutionNode* previous) die->setMaxValue(m_max); die->roll(); //qDebug() << die->getValue() << "value"; - m_diceResult->insertResult(die); + m_diceResult->insertResult(die); } if(nullptr!=m_nextNode) { diff --git a/node/ifnode.cpp b/node/ifnode.cpp index a74667d..c037121 100644 --- a/node/ifnode.cpp +++ b/node/ifnode.cpp @@ -21,7 +21,7 @@ #include "result/diceresult.h" IfNode::IfNode() - : m_validator(nullptr),m_true(nullptr),m_false(nullptr),m_conditionType(AllOfThem) + : m_validator(nullptr),m_conditionType(AllOfThem),m_true(nullptr),m_false(nullptr) { //m_result = new DiceResult(); } @@ -96,12 +96,10 @@ void IfNode::run(ExecutionNode *previous) bool result = m_validator->hasValid(dice,true,true); trueForAll = trueForAll ? result : false; falseForAll = falseForAll ? result : false; - qDebug() << "result" << result; oneIsTrue |= result; oneIsFalse = !result ? true : oneIsFalse; } - qDebug() << "OneIsVrai: " << oneIsTrue <<" oneIsFaux" <<oneIsFalse<<" vraiForAll" <<trueForAll <<" fauxForAll" <<falseForAll << m_conditionType; if(m_conditionType==OneOfThem) { if(oneIsTrue) @@ -272,6 +270,8 @@ void IfNode::setConditionType(const IfNode::ConditionType &conditionType) ExecutionNode* IfNode::getCopy() const { IfNode* node = new IfNode(); + + node->setConditionType(m_conditionType); if(nullptr!=m_validator) { node->setValidator(m_validator->getCopy()); diff --git a/node/numbernode.cpp b/node/numbernode.cpp index 26141c5..09325ae 100644 --- a/node/numbernode.cpp +++ b/node/numbernode.cpp @@ -38,7 +38,7 @@ NumberNode::~NumberNode() void NumberNode::run(ExecutionNode* previous) { - m_previousNode = previous; + m_previousNode = previous; if(nullptr!=previous) { m_result->setPrevious(previous->getResult()); diff --git a/node/startingnode.cpp b/node/startingnode.cpp index 670dc7d..210606b 100644 --- a/node/startingnode.cpp +++ b/node/startingnode.cpp @@ -26,7 +26,7 @@ StartingNode::StartingNode() } void StartingNode::run(ExecutionNode*) { - m_previousNode = nullptr; + m_previousNode = nullptr; if(nullptr!=m_nextNode) { m_nextNode->run(this); @@ -34,14 +34,14 @@ void StartingNode::run(ExecutionNode*) } QString StartingNode::toString(bool withlabel) const { - if(withlabel) - { - return QString("%1 [label=\"StartingNode\"]").arg(m_id); - } - else - { - return m_id; - } + if(withlabel) + { + return QString("%1 [label=\"StartingNode\"]").arg(m_id); + } + else + { + return m_id; + } } |