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:
Robert C. Helling 2017-03-10 13:37:54 +01:00 committed by Dirk Hohndel
parent 295b1b78d8
commit eae4bd82a5
5 changed files with 54 additions and 54 deletions

View file

@ -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;
}