diff options
author | Robert C. Helling <helling@atdotde.de> | 2017-03-10 13:37:54 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-03-11 08:03:25 -0800 |
commit | eae4bd82a5e3009ef555771cb77e9289d2a0f585 (patch) | |
tree | 7cd071b080b673ba46f83bcd2deca8a2ac21945e /core/dive.c | |
parent | 295b1b78d888b528f7a5a23411b1a82d4b39eed1 (diff) | |
download | subsurface-eae4bd82a5e3009ef555771cb77e9289d2a0f585.tar.gz |
Change type of divedatepoint.depth to depth_t
... for consistency, while we are at it.
There are still some internal depth variables which are ints
somebody might take a go at those.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'core/dive.c')
-rw-r--r-- | core/dive.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/dive.c b/core/dive.c index b091e2bc7..d7b423ad8 100644 --- a/core/dive.c +++ b/core/dive.c @@ -3588,11 +3588,11 @@ void average_max_depth(struct diveplan *dive, int *avg_depth, int *max_depth) while (dp) { if (dp->time) { /* Ignore gas indication samples */ - integral += (dp->depth + last_depth) * (dp->time - last_time) / 2; + integral += (dp->depth.mm + last_depth) * (dp->time - last_time) / 2; last_time = dp->time; - last_depth = dp->depth; - if (dp->depth > *max_depth) - *max_depth = dp->depth; + last_depth = dp->depth.mm; + if (dp->depth.mm > *max_depth) + *max_depth = dp->depth.mm; } dp = dp->next; } |