diff options
Diffstat (limited to 'result')
| -rw-r--r-- | result/diceresult.cpp | 5 | ||||
| -rw-r--r-- | result/diceresult.h | 2 | ||||
| -rw-r--r-- | result/result.cpp | 5 | ||||
| -rw-r--r-- | result/result.h | 2 |
4 files changed, 13 insertions, 1 deletions
diff --git a/result/diceresult.cpp b/result/diceresult.cpp index b8ed8d5..ce59cb1 100644 --- a/result/diceresult.cpp +++ b/result/diceresult.cpp @@ -143,6 +143,11 @@ Die::ArithmeticOperator DiceResult::getOperator() const return m_operator; } +void DiceResult::clear() +{ + m_diceValues.clear(); +} + void DiceResult::setOperator(const Die::ArithmeticOperator& dieOperator) { m_operator = dieOperator; diff --git a/result/diceresult.h b/result/diceresult.h index 3dac826..8ff041f 100644 --- a/result/diceresult.h +++ b/result/diceresult.h @@ -79,6 +79,8 @@ public: void setOperator(const Die::ArithmeticOperator & dieOperator); bool contains(Die *die, const std::function<bool (const Die *, const Die *)> equal); + void clear(); + virtual Result* getCopy() const; private: qreal getScalarResult(); diff --git a/result/result.cpp b/result/result.cpp index f79e004..8b4667b 100644 --- a/result/result.cpp +++ b/result/result.cpp @@ -45,7 +45,10 @@ bool Result::isStringResult() const { return false; } - +void Result::clear() +{ + +} bool Result::hasResultOfType(RESULT_TYPE type) const { return (m_resultTypes & type); diff --git a/result/result.h b/result/result.h index 5de3572..5fc4408 100644 --- a/result/result.h +++ b/result/result.h @@ -69,6 +69,8 @@ public: */ virtual bool isStringResult() const; + virtual void clear(); + /** * @brief getStringResult * @return |