aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/die.cpp
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2022-04-16 01:58:40 +0200
committerRenaud G <renaud@rolisteam.org>2022-04-16 02:59:30 +0200
commit6ba9324cf4864ebd2e2cdec8098b0889ceaea0a8 (patch)
treee29af0f803de724e28eab85da2dfe6c535a8292b /die.cpp
parent0c040da59e6aa2df3bd0c22e38b2afe0512d3749 (diff)
downloadOneRoll-6ba9324cf4864ebd2e2cdec8098b0889ceaea0a8.tar.gz
OneRoll-6ba9324cf4864ebd2e2cdec8098b0889ceaea0a8.zip
Make sure Windows compilation works
Diffstat (limited to 'die.cpp')
-rw-r--r--die.cpp18
1 files changed, 9 insertions, 9 deletions
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<qint64>(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;
}