diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-02-09 07:12:30 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-02-09 07:19:29 -0800 |
commit | b9865d6bbc30ff4f82ffa17d4a2e3e74bc1054ed (patch) | |
tree | 0bb5aac0bd1f854ed3ee896b57d4ed73524ffad3 /file.c | |
parent | c7efcb23a9a838f88c6691cb7b278126ae639c4b (diff) | |
download | subsurface-b9865d6bbc30ff4f82ffa17d4a2e3e74bc1054ed.tar.gz |
Move duration to dive structure and replace accessor function
When starting on this quest to stop using the first divecomputer instead
of data for the whole dive in commit eb73b5a528c8 ("Duration of a dive is
the maximum duration from all divecomputers") I introduced an accessor
function that calculates the dive duration on the fly as the maximum of
the durations in the divecomputers.
Since then Linus and I have added quite a few of the variables back to the
dive data structure and it makes perfect sense to do the same thing for
the duration as well and simply do the calculation once during fixup.
This commit also replaces accesses to the first divecomputer in
likely_same_dive to use the maxdepth and meandepth of the dive (those two
slipped through the cracks in the previous commits, it seems).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'file.c')
0 files changed, 0 insertions, 0 deletions