mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
295b1b78d8
commit
eae4bd82a5
5 changed files with 54 additions and 54 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue