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>
This commit is contained in:
Anton Lundin 2014-07-17 21:16:49 +02:00 committed by Dirk Hohndel
parent 8e5eb71e0b
commit 9eeeba468a
3 changed files with 12 additions and 11 deletions

View file

@ -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;
}
}