planner: pass in_planner argument to clear_deco()

To remove reliance on global state, pass an "in_planner" argument
to clear_deco(). Thus, calls to in_planner() can be removed.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-02-12 17:52:31 +01:00 committed by Dirk Hohndel
parent 8103e947aa
commit 03a7e65cf0
4 changed files with 6 additions and 6 deletions

View file

@ -521,7 +521,7 @@ int init_decompression(struct deco_state *ds, const struct dive *dive, bool in_p
#if DECO_CALC_DEBUG & 2
printf("Init deco\n");
#endif
clear_deco(ds, surface_pressure);
clear_deco(ds, surface_pressure, in_planner);
deco_init = true;
#if DECO_CALC_DEBUG & 2
printf("Tissues after init:\n");
@ -559,7 +559,7 @@ int init_decompression(struct deco_state *ds, const struct dive *dive, bool in_p
#if DECO_CALC_DEBUG & 2
printf("Init deco\n");
#endif
clear_deco(ds, surface_pressure);
clear_deco(ds, surface_pressure, in_planner);
#if DECO_CALC_DEBUG & 2
printf("Tissues after no previous dive, surface time set to 48h:\n");
dump_tissues(ds);