subsurface/profile-widget
Berthold Stoeger 6e4a253896 Profile: fix SAC calculation for air dives
Commit f5b11daffd changed gasmix
arguments and return values to be passed by value instead of
using pointers.

Notably, get_gasmix() is fed a default-value and returns a
new value. In the old code, NULL was passed in in a first
loop iteration and non-NULL was always returned in the first
iteration. Thus, an equality comparison of passed-in an
returned gasmix would always fail in the first loop iteration.

The new code passed in air as default. Now if air was also
returned, then the matching gases were not calculated in
calculate_sac(). To revert to the old behavior, pass in
an invalid gasmix.

Moreover, give names to the invalid and air gasmixes.

Reported-by: tormento <turment@gmail.com>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-09-10 14:23:59 -07:00
..
animationfunctions.cpp core/tests: merge Animations and add vars. to qPrefDisplay 2018-08-25 11:49:47 -07:00
animationfunctions.h Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
CMakeLists.txt Correctly handle SubsurfaceMobile 2016-01-08 08:04:24 -08:00
divecartesianaxis.cpp profile-widget: remove SettingsObjectWrapper and update qPref calls 2018-08-15 16:11:39 -07:00
divecartesianaxis.h Cleanup: replace virtual by override where appropriate 2018-07-31 11:02:34 +02:00
diveeventitem.cpp Cleanup: pass gasmix by value 2018-08-23 05:16:38 -07:00
diveeventitem.h Cleanup: pass gasmix by value 2018-08-23 05:16:38 -07:00
divelineitem.cpp Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
divelineitem.h Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
divepixmapitem.cpp Dive video: paint duration-bar above thumbnail in profile plot 2018-07-23 15:58:55 -07:00
divepixmapitem.h Cleanup: remove all override modifiers 2018-08-01 06:30:00 -07:00
diveprofileitem.cpp Profile: fix SAC calculation for air dives 2018-09-10 14:23:59 -07:00
diveprofileitem.h Cleanup: constify threshold pointers in DiveProfileItem 2018-09-07 11:03:30 -07:00
diverectitem.cpp Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
diverectitem.h Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
divetextitem.cpp Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
divetextitem.h Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
divetooltipitem.cpp profilewidget: remove QSettings 2018-08-25 11:49:47 -07:00
divetooltipitem.h Cleanup: replace virtual by override where appropriate 2018-07-31 11:02:34 +02:00
profilewidget2.cpp Cleanup: constify threshold pointers in DiveProfileItem 2018-09-07 11:03:30 -07:00
profilewidget2.h Cleanup: constify threshold pointers in DiveProfileItem 2018-09-07 11:03:30 -07:00
qmlprofile.cpp profile: make profile self contained 2018-06-09 17:16:53 +02:00
qmlprofile.h profile: make profile self contained 2018-06-09 17:16:53 +02:00
ruleritem.cpp profile-widget: remove SettingsObjectWrapper and update qPref calls 2018-08-15 16:11:39 -07:00
ruleritem.h Cleanup: remove all override modifiers 2018-08-01 06:30:00 -07:00
tankitem.cpp Cleanup: const-ify functions taking pointers to events 2018-08-23 05:16:38 -07:00
tankitem.h Cleanup: pass gasmix by value 2018-08-23 05:16:38 -07:00