From 7d55efb32e845c910177c083e095956765fd5c17 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Sun, 24 Jan 2021 13:30:26 +0100 Subject: Remove build warnings. --- booleancondition.h | 2 +- node/groupnode.h | 8 ++++---- result/stringresult.h | 2 +- tests/dice/tst_dice.cpp | 5 ++++- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/booleancondition.h b/booleancondition.h index f420adf..88bab30 100644 --- a/booleancondition.h +++ b/booleancondition.h @@ -49,7 +49,7 @@ public: void setOperator(LogicOperator m); void setValueNode(ExecutionNode*); - QString toString(); + QString toString() override; virtual Dice::CONDITION_STATE isValidRangeSize(const std::pair& range) const override; /** diff --git a/node/groupnode.h b/node/groupnode.h index 84ff2bb..d037080 100644 --- a/node/groupnode.h +++ b/node/groupnode.h @@ -48,10 +48,10 @@ class GroupNode : public ExecutionNode { public: GroupNode(bool complexOutput= false); - void run(ExecutionNode* previous); - virtual QString toString(bool withLabel) const; - virtual qint64 getPriority() const; - virtual ExecutionNode* getCopy() const; + void run(ExecutionNode* previous) override; + virtual QString toString(bool withLabel) const override; + virtual qint64 getPriority() const override; + virtual ExecutionNode* getCopy() const override; int getGroupValue() const; void setGroupValue(qint64 groupValue); diff --git a/result/stringresult.h b/result/stringresult.h index f1029c7..bd8956b 100644 --- a/result/stringresult.h +++ b/result/stringresult.h @@ -22,7 +22,7 @@ public: void finished(); QString getText() const; virtual QVariant getResult(Dice::RESULT_TYPE) override; - virtual QString toString(bool); + virtual QString toString(bool) override; virtual void setHighLight(bool); virtual bool hasHighLight() const; diff --git a/tests/dice/tst_dice.cpp b/tests/dice/tst_dice.cpp index 0ede904..910fb4d 100644 --- a/tests/dice/tst_dice.cpp +++ b/tests/dice/tst_dice.cpp @@ -707,8 +707,9 @@ void TestDice::countTest() QVector vector; bool first= true; - for(auto i : condition) + for(const auto& i : condition) { + Q_UNUSED(i) if(!first) { first= !first; @@ -989,6 +990,8 @@ void TestDice::ifTest_data() QTest::addRow("cmd9") << QVector({25, 8, 14}) << onScalar << 1 << "False"; QTest::addRow("cmd10") << QVector({25, 8, 14}) << onScalar << 47 << "True"; + + QTest::addRow("cmd11") << QVector({25, 8, 14}) << onEachValue << 47 << "True"; } void TestDice::paintTest() {} -- cgit v1.2.3-70-g09d2