From 2bf46381a82fd6ae514b014b8d32954693bca346 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 1 Jun 2014 14:17:06 -0700 Subject: Use proper types This is step one of many to use gasmix instead of int o2/he. Right now some of these changes look ridiculous because after changing a few lines we immediately go back to o2 = get_o2(gas). The reason is that I wanted to convert a hand full of functions at a time. So in this commit I only change validate_gas(), get_gas_from_events() and get_gasidx() to use a struct gasmix instead of int o2, int he. This state builds and survived some mild testing. Let's continue on top of that. Signed-off-by: Dirk Hohndel --- qt-ui/profile/profilewidget2.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'qt-ui/profile') diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index 73df4f99d..4cfd295f8 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -992,12 +992,12 @@ void ProfileWidget2::changeGas() // backup the things on the dataModel, since we will clear that out. unsigned int diveComputer = dataModel->dcShown(); int diveId = dataModel->id(); - int o2, he; + struct gasmix gasmix; int seconds = timeAxis->valueAt(scenePos); struct dive *d = get_dive_by_uniq_id(diveId); - validate_gas(gas.toUtf8().constData(), &o2, &he); - add_gas_switch_event(d, get_dive_dc(d, diveComputer), seconds, get_gasidx(d, o2, he)); + validate_gas(gas.toUtf8().constData(), &gasmix); + add_gas_switch_event(d, get_dive_dc(d, diveComputer), seconds, get_gasidx(d, &gasmix)); // this means we potentially have a new tank that is being used and needs to be shown fixup_dive(d); MainWindow::instance()->information()->updateDiveInfo(selected_dive); -- cgit v1.2.3-70-g09d2