profile: small cleanup concerning depth_t

Operate directly on depth_t instead of working with the base
type.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-12-14 17:27:49 +01:00 committed by Michael Keller
parent 94a54d8e35
commit dbc06d78b6
2 changed files with 5 additions and 6 deletions

View file

@ -490,7 +490,7 @@ static int sac_between(const struct dive *dive, const struct plot_info &pi, int
do {
const struct plot_data &entry = pi.entry[first];
const struct plot_data &next = pi.entry[first + 1];
depth_t depth { .mm = (entry.depth.mm + next.depth.mm) / 2 };
depth_t depth = (entry.depth + next.depth) / 2;
int time = next.sec - entry.sec;
double atm = dive->depth_to_atm(depth);