summaryrefslogtreecommitdiffstats
path: root/qt-models
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@gmail.com>2016-03-09 15:16:27 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-03-09 11:44:13 -0800
commit6a96fe25ec8b9c7751898a74cb68f672e2df0988 (patch)
treed7874ed3405a26c969c86ac4c24b56bb562c427e /qt-models
parent8378d3dd4b333a7746be8d8b15c0c4612e924e7d (diff)
downloadsubsurface-6a96fe25ec8b9c7751898a74cb68f672e2df0988.tar.gz
Silence warnings in diveplannermodel.cpp
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-models')
-rw-r--r--qt-models/diveplannermodel.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp
index 7fbf2e323..f7570fd55 100644
--- a/qt-models/diveplannermodel.cpp
+++ b/qt-models/diveplannermodel.cpp
@@ -25,7 +25,7 @@ void DivePlannerPointsModel::removeSelectedPoints(const QVector<int> &rows)
void DivePlannerPointsModel::createSimpleDive()
{
- struct gasmix gas = { 0 };
+ struct gasmix gas = {};
// initialize the start time in the plan
diveplan.when = displayed_dive.when;
@@ -201,6 +201,7 @@ bool DivePlannerPointsModel::recalcQ()
int DivePlannerPointsModel::columnCount(const QModelIndex &parent) const
{
+ Q_UNUSED(parent);
return COLUMNS; // to disable CCSETPOINT subtract one
}
@@ -253,7 +254,7 @@ QVariant DivePlannerPointsModel::data(const QModelIndex &index, int role) const
bool DivePlannerPointsModel::setData(const QModelIndex &index, const QVariant &value, int role)
{
- struct gasmix gas = { 0 };
+ struct gasmix gas = {};
int i, shift;
if (role == Qt::EditRole) {
divedatapoint &p = divepoints[index.row()];
@@ -295,7 +296,7 @@ void DivePlannerPointsModel::gaschange(const QModelIndex &index, QString newgas)
{
int i = index.row();
gasmix oldgas = divepoints[i].gasmix;
- gasmix gas = { 0 };
+ gasmix gas = {};
if (!validate_gas(newgas.toUtf8().data(), &gas))
return;
while (i < rowCount() && gasmix_distance(&oldgas, &divepoints[i].gasmix) == 0)
@@ -587,8 +588,8 @@ int DivePlannerPointsModel::lastEnteredPoint()
int DivePlannerPointsModel::addStop(int milimeters, int seconds, gasmix *gas_in, int ccpoint, bool entered)
{
- struct gasmix air = { 0 };
- struct gasmix gas = { 0 };
+ struct gasmix air = {};
+ struct gasmix gas = {};
bool usePrevious = false;
if (gas_in)
gas = *gas_in;