aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/result
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2016-01-08 20:54:21 +0100
committerRenaud G <renaud@rolisteam.org>2016-01-08 20:54:21 +0100
commitdb15e41502743d1124062eddb8d2bb3617e2593c (patch)
tree259d73b1be7b10efbfd125c118fc7d956a9b1aac /result
parent6a1a9f1c7f3c50d04d89cc54e93d08ed6f2c4cc2 (diff)
downloadOneRoll-db15e41502743d1124062eddb8d2bb3617e2593c.tar.gz
OneRoll-db15e41502743d1124062eddb8d2bb3617e2593c.zip
fix cppcheck errors
Diffstat (limited to 'result')
-rw-r--r--result/diceresult.cpp21
-rw-r--r--result/result.cpp2
-rw-r--r--result/result.h2
3 files changed, 12 insertions, 13 deletions
diff --git a/result/diceresult.cpp b/result/diceresult.cpp
index ffa5d02..74aa4e1 100644
--- a/result/diceresult.cpp
+++ b/result/diceresult.cpp
@@ -46,19 +46,18 @@ DiceResult::~DiceResult()
}
QVariant DiceResult::getResult(RESULT_TYPE type)
{
-
switch (type)
{
- case SCALAR:
- return getScalarResult();
- break;
- case DICE_LIST:
- {
- return QVariant();
- break;
- }
- default:
- break;
+ case SCALAR:
+ {
+ return getScalarResult();
+ }
+ case DICE_LIST:
+ {
+ return QVariant();
+ }
+ default:
+ break;
}
return QVariant();
diff --git a/result/result.cpp b/result/result.cpp
index 7b6633c..163d539 100644
--- a/result/result.cpp
+++ b/result/result.cpp
@@ -37,7 +37,7 @@ void Result::setPrevious(Result* p)
m_previous = p;
}
-bool Result::isStringResult()
+bool Result::isStringResult() const
{
return false;
}
diff --git a/result/result.h b/result/result.h
index 3f16535..2a5b7f9 100644
--- a/result/result.h
+++ b/result/result.h
@@ -62,7 +62,7 @@ public:
* @brief isStringResult
* @return
*/
- bool isStringResult();
+ virtual bool isStringResult() const;
/**
* @brief getStringResult