mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: pass depth_t to depth_to_* functions
This is a drop in the ocean. Make the usage of the unit-types a bit more consistent throughout the code base. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
ccf67b6e71
commit
c88f8bdd07
13 changed files with 216 additions and 213 deletions
|
@ -280,9 +280,9 @@ static void fill_missing_tank_pressures(const struct dive *dive, struct plot_inf
|
|||
static inline int calc_pressure_time(const struct dive *dive, const struct plot_data &a, const struct plot_data &b)
|
||||
{
|
||||
int time = b.sec - a.sec;
|
||||
int depth = (a.depth + b.depth) / 2;
|
||||
depth_t depth { .mm = (a.depth + b.depth) / 2 };
|
||||
|
||||
if (depth <= SURFACE_THRESHOLD)
|
||||
if (depth.mm <= SURFACE_THRESHOLD)
|
||||
return 0;
|
||||
|
||||
return dive->depth_to_mbar(depth) * time;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue