planner: pass in_planner argument to add_segment()

To remove reliance on global state, pass an "in_planner" argument
to add_segment(). 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:39:46 +01:00 committed by Dirk Hohndel
parent 9fb37ea27f
commit 93ecad1b04
6 changed files with 33 additions and 30 deletions

View file

@ -26,7 +26,7 @@ extern struct dive_table dive_table;
extern void sort_dive_table(struct dive_table *table);
extern void update_cylinder_related_info(struct dive *);
extern int init_decompression(struct deco_state *ds, const struct dive *dive);
extern int init_decompression(struct deco_state *ds, const struct dive *dive, bool in_planner);
/* divelist core logic functions */
extern void process_loaded_dives();