aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/result/diceresult.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 /result/diceresult.cpp
parent0c040da59e6aa2df3bd0c22e38b2afe0512d3749 (diff)
downloadOneRoll-6ba9324cf4864ebd2e2cdec8098b0889ceaea0a8.tar.gz
OneRoll-6ba9324cf4864ebd2e2cdec8098b0889ceaea0a8.zip
Make sure Windows compilation works
Diffstat (limited to 'result/diceresult.cpp')
-rw-r--r--result/diceresult.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/result/diceresult.cpp b/result/diceresult.cpp
index 2f13210..31e316b 100644
--- a/result/diceresult.cpp
+++ b/result/diceresult.cpp
@@ -23,7 +23,7 @@
#include "diceresult.h"
#include <QDebug>
-DiceResult::DiceResult() : m_operator(Die::PLUS)
+DiceResult::DiceResult()
{
m_resultTypes= (static_cast<int>(Dice::RESULT_TYPE::DICE_LIST) | static_cast<int>(Dice::RESULT_TYPE::SCALAR));
m_homogeneous= true;
@@ -107,20 +107,20 @@ qreal DiceResult::getScalarResult()
{
switch(m_operator)
{
- case Die::PLUS:
+ case Dice::ArithmeticOperator::PLUS:
scalar+= tmp->getValue();
break;
- case Die::MULTIPLICATION:
+ case Dice::ArithmeticOperator::MULTIPLICATION:
scalar*= tmp->getValue();
break;
- case Die::MINUS:
+ case Dice::ArithmeticOperator::MINUS:
scalar-= tmp->getValue();
break;
- case Die::POW:
+ case Dice::ArithmeticOperator::POW:
scalar= static_cast<int>(pow(static_cast<double>(scalar), static_cast<double>(tmp->getValue())));
break;
- case Die::DIVIDE:
- case Die::INTEGER_DIVIDE:
+ case Dice::ArithmeticOperator::DIVIDE:
+ case Dice::ArithmeticOperator::INTEGER_DIVIDE:
if(tmp->getValue() != 0)
{
scalar/= tmp->getValue();
@@ -142,7 +142,7 @@ qreal DiceResult::getScalarResult()
}
}
-Die::ArithmeticOperator DiceResult::getOperator() const
+Dice::ArithmeticOperator DiceResult::getOperator() const
{
return m_operator;
}
@@ -152,7 +152,7 @@ void DiceResult::clear()
m_diceValues.clear();
}
-void DiceResult::setOperator(const Die::ArithmeticOperator& dieOperator)
+void DiceResult::setOperator(const Dice::ArithmeticOperator& dieOperator)
{
m_operator= dieOperator;
}