From bd4a0c837bd5e3b4dbf9d3dcef892850d04ec6ac Mon Sep 17 00:00:00 2001 From: Renaud Guezennec Date: Wed, 7 Nov 2018 09:25:23 +0000 Subject: fix compilation --- result/diceresult.h | 1 + 1 file changed, 1 insertion(+) (limited to 'result') diff --git a/result/diceresult.h b/result/diceresult.h index 8ff041f..8ea807a 100644 --- a/result/diceresult.h +++ b/result/diceresult.h @@ -22,6 +22,7 @@ #ifndef DICERESULT_H #define DICERESULT_H #include +#include #include "die.h" #include "result.h" -- cgit v1.2.3-70-g09d2 From 1d8bd391b1df4fd2f2f274828db14c9ce695eb8b Mon Sep 17 00:00:00 2001 From: Renaud G Date: Fri, 9 Nov 2018 23:47:26 +0100 Subject: fix some warnings --- diceparser.cpp | 2 -- result/diceresult.cpp | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'result') diff --git a/diceparser.cpp b/diceparser.cpp index 6182a89..daa8d9d 100644 --- a/diceparser.cpp +++ b/diceparser.cpp @@ -495,7 +495,6 @@ QStringList DiceParser::getAllDiceResult(bool& hasAlias) void DiceParser::getDiceResultFromAllInstruction(QList& resultList) { - int i = 0; for(auto start : m_startNodes) { ExecutionNode* next = getLeafNode(start); @@ -525,7 +524,6 @@ void DiceParser::getDiceResultFromAllInstruction(QList& resu void DiceParser::getLastDiceResult(QList& diceValuesList,bool& homogeneous) { - int i = 0; for(auto start : m_startNodes) { ExportedDiceResult diceValues; diff --git a/result/diceresult.cpp b/result/diceresult.cpp index 7894b60..c1089dd 100644 --- a/result/diceresult.cpp +++ b/result/diceresult.cpp @@ -114,6 +114,9 @@ qreal DiceResult::getScalarResult() case Die::MINUS: scalar-=tmp->getValue(); break; + case Die::POW: + scalar=static_cast(pow(static_cast(scalar),static_cast(tmp->getValue()))); + break; case Die::DIVIDE: case Die::INTEGER_DIVIDE: if(tmp->getValue()!=0) @@ -135,8 +138,6 @@ qreal DiceResult::getScalarResult() } return scalar; } - - return 0; } Die::ArithmeticOperator DiceResult::getOperator() const -- cgit v1.2.3-70-g09d2