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

@ -537,7 +537,7 @@ int dive_table::init_decompression(struct deco_state *ds, const struct dive *div
printf("Yes\n");
#endif
surface_pressure = get_surface_pressure_in_mbar(&pdive, true) / 1000.0;
surface_pressure = pdive.get_surface_pressure().mbar / 1000.0;
/* Is it the first dive we add? */
if (!deco_init) {
#if DECO_CALC_DEBUG & 2
@ -575,7 +575,7 @@ int dive_table::init_decompression(struct deco_state *ds, const struct dive *div
#endif
}
surface_pressure = get_surface_pressure_in_mbar(dive, true) / 1000.0;
surface_pressure = dive->get_surface_pressure().mbar / 1000.0;
/* We don't have had a previous dive at all? */
if (!deco_init) {
#if DECO_CALC_DEBUG & 2