core: move get_surface_pressure() to struct dive

Feel natural in a C++ code base.

Remove the second parameter, because all callers where passing
`true` anyway.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-06-30 17:26:12 +02:00 committed by bstoeger
parent 6e29c00f35
commit c812dd140b
5 changed files with 9 additions and 12 deletions

View file

@ -841,7 +841,7 @@ static void calculate_deco_information(struct deco_state *ds, const struct deco_
const struct divecomputer *dc, struct plot_info &pi)
{
int i, count_iteration = 0;
double surface_pressure = (dc->surface_pressure.mbar ? dc->surface_pressure.mbar : get_surface_pressure_in_mbar(dive, true)) / 1000.0;
double surface_pressure = (dc->surface_pressure.mbar ? dc->surface_pressure.mbar : dive->get_surface_pressure().mbar) / 1000.0;
bool first_iteration = true;
int prev_deco_time = 10000000, time_deep_ceiling = 0;
bool in_planner = planner_ds != NULL;