From 6ba9324cf4864ebd2e2cdec8098b0889ceaea0a8 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Sat, 16 Apr 2022 01:58:40 +0200 Subject: Make sure Windows compilation works --- die.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'die.cpp') diff --git a/die.cpp b/die.cpp index 19bc4df..4214b97 100644 --- a/die.cpp +++ b/die.cpp @@ -51,7 +51,7 @@ Die::Die() , m_highlighted(true) , m_base(1) , m_color("") - , m_op(Die::PLUS) //,m_mt(m_randomDevice) + , m_op(Dice::ArithmeticOperator::PLUS) //,m_mt(m_randomDevice) { buildSeed(); } @@ -109,17 +109,17 @@ qint64 Die::getValue() const { switch(m_op) { - case PLUS: + case Dice::ArithmeticOperator::PLUS: value+= tmp; break; - case MULTIPLICATION: + case Dice::ArithmeticOperator::MULTIPLICATION: value*= tmp; break; - case MINUS: + case Dice::ArithmeticOperator::MINUS: value-= tmp; break; - case INTEGER_DIVIDE: - case DIVIDE: + case Dice::ArithmeticOperator::INTEGER_DIVIDE: + case Dice::ArithmeticOperator::DIVIDE: if(tmp != 0) { value/= tmp; @@ -129,7 +129,7 @@ qint64 Die::getValue() const // error(); } break; - case POW: + case Dice::ArithmeticOperator::POW: value= static_cast(std::pow(value, tmp)); break; } @@ -237,12 +237,12 @@ void Die::setMaxValue(const qint64& maxValue) m_maxValue= maxValue; } -Die::ArithmeticOperator Die::getOp() const +Dice::ArithmeticOperator Die::getOp() const { return m_op; } -void Die::setOp(const Die::ArithmeticOperator& op) +void Die::setOp(const Dice::ArithmeticOperator& op) { m_op= op; } -- cgit v1.2.3-70-g09d2