From 76264eb8142d36711d1ffc207175599ca526adb0 Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Tue, 26 Jun 2018 15:14:25 +0200 Subject: [PATCH] cleaned up some warnings --- source/CheckableTestModel/CheckableTestModel.cpp | 6 +++--- source/ResultWidget/PRMap.cpp | 2 ++ source/SubTests/V2Svk/V2SvkModel.cpp | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/source/CheckableTestModel/CheckableTestModel.cpp b/source/CheckableTestModel/CheckableTestModel.cpp index e962874..4dcf09c 100644 --- a/source/CheckableTestModel/CheckableTestModel.cpp +++ b/source/CheckableTestModel/CheckableTestModel.cpp @@ -10,7 +10,7 @@ CheckableTestModel::CheckableTestModel(QObject *parent) int CheckableTestModel::rowCount(const QModelIndex &parent) const { - return m_tests.size(); + return static_cast(m_tests.size()); } int CheckableTestModel::columnCount(const QModelIndex &parent) const @@ -19,7 +19,7 @@ int CheckableTestModel::columnCount(const QModelIndex &parent) const for (const auto &test : m_tests) { - columnCount = std::max(columnCount, test.size()); + columnCount = std::max(columnCount, static_cast(test.size())); } return columnCount; @@ -181,7 +181,7 @@ const CheckableItem &CheckableTestModel::getItem(const QModelIndex &index) const unsigned int CheckableTestModel::getPoints() const { - size_t points = 0; + unsigned int points = 0; for (const auto &test : m_tests) { diff --git a/source/ResultWidget/PRMap.cpp b/source/ResultWidget/PRMap.cpp index ee86854..41e76dc 100644 --- a/source/ResultWidget/PRMap.cpp +++ b/source/ResultWidget/PRMap.cpp @@ -30,6 +30,8 @@ unsigned int PRMap::lookup(const Age &age, const unsigned int &points) return index - 1; } } + + return 0; }(); if (ageIndex >= m_PRs.at(points).size()) diff --git a/source/SubTests/V2Svk/V2SvkModel.cpp b/source/SubTests/V2Svk/V2SvkModel.cpp index d86b883..249fe91 100644 --- a/source/SubTests/V2Svk/V2SvkModel.cpp +++ b/source/SubTests/V2Svk/V2SvkModel.cpp @@ -38,7 +38,7 @@ V2SvkModel::V2SvkModel(QObject *parent) unsigned int V2SvkModel::getV2Points() { - size_t points = 0; + unsigned int points = 0; for (auto testIndex : { 0, 1, 3, 5, 7, 8 }) { @@ -58,7 +58,7 @@ unsigned int V2SvkModel::getV2Points() unsigned int V2SvkModel::getSvkPoints() { - size_t points = 0; + unsigned int points = 0; for (auto testIndex : { 2, 4, 6, 9, 10 }) {