From 64e9988ba715e6e196b84e4a69c871c761562bbd Mon Sep 17 00:00:00 2001 From: Renaud G Date: Mon, 27 Aug 2018 01:03:08 +0200 Subject: -New API for validating validor. Prevent endless loop in R operator. --- node/dicerollernode.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'node/dicerollernode.cpp') diff --git a/node/dicerollernode.cpp b/node/dicerollernode.cpp index 6691c38..1d842d6 100644 --- a/node/dicerollernode.cpp +++ b/node/dicerollernode.cpp @@ -22,7 +22,7 @@ void DiceRollerNode::run(ExecutionNode* previous) Result* result=previous->getResult(); if(nullptr!=result) { - m_diceCount = result->getResult(Result::SCALAR).toReal(); + m_diceCount = static_cast(result->getResult(Result::SCALAR).toReal()); m_result->setPrevious(result); if(m_diceCount == 0) @@ -67,6 +67,11 @@ quint64 DiceRollerNode::getFaces() const { return abs(m_max-m_min)+1; } + +std::pair DiceRollerNode::getRange() const +{ + return std::make_pair(m_min,m_max); +} QString DiceRollerNode::toString(bool wl) const { if(wl) @@ -85,8 +90,6 @@ qint64 DiceRollerNode::getPriority() const // { // priority = m_nextNode->getPriority(); // } - - return priority; } ExecutionNode* DiceRollerNode::getCopy() const -- cgit v1.2.3-70-g09d2