From db15e41502743d1124062eddb8d2bb3617e2593c Mon Sep 17 00:00:00 2001 From: Renaud G Date: Fri, 8 Jan 2016 20:54:21 +0100 Subject: fix cppcheck errors --- result/diceresult.cpp | 21 ++++++++++----------- result/result.cpp | 2 +- result/result.h | 2 +- 3 files changed, 12 insertions(+), 13 deletions(-) (limited to 'result') 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 -- cgit v1.2.3-70-g09d2