aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2014-07-17 21:16:49 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-18 10:02:11 -0700
commit9eeeba468a5b4913cf889801690dc3aa834c7780 (patch)
treeff47d4a066684b0b0a8ffdb9af97414bfaa9c70e /qt-ui
parent8e5eb71e0b344a68fc6fcfae1ace6fef6605a3d5 (diff)
downloadsubsurface-9eeeba468a5b4913cf889801690dc3aa834c7780.tar.gz
Use more of our propper types in the planner
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/diveplanner.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index 8882664c9..f68214b83 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -105,7 +105,7 @@ void DivePlannerPointsModel::setupStartTime()
void DivePlannerPointsModel::loadFromDive(dive *d)
{
CylindersModel::instance()->updateDive();
- int lasttime = 0;
+ duration_t lasttime = {};
// we start with the first gas and see if it was changed
struct gasmix gas = d->cylinder[0].gasmix;
for (int i = 0; i < d->dc.samples - 1; i++) {
@@ -114,7 +114,7 @@ void DivePlannerPointsModel::loadFromDive(dive *d)
continue;
get_gas_from_events(&d->dc, lasttime, &gas);
plannerModel->addStop(s.depth.mm, s.time.seconds, &gas, 0, true);
- lasttime = s.time.seconds;
+ lasttime = s.time;
}
}