diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-01-08 23:55:20 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-01-10 15:57:39 -0800 |
commit | 9bfc6d2520b83b8151a84e23cbab082ab460532e (patch) | |
tree | 246d0cf6ed87b1a6dde850ff3633431752d675ff /core/profile.h | |
parent | 94a57d9a1d9b1d1eeb89b1ccbba27f4b677ff6ed (diff) | |
download | subsurface-9bfc6d2520b83b8151a84e23cbab082ab460532e.tar.gz |
profile: use a parameter to determine planner state
The in_planner() function is incompatible with a reentrant
profile, since it accesses a global variable. In
create_plot_info_new() it is essentially redundant, because
there is a planner_ds (ds = deco_state) parameter that
is used only when in the planner. Therefore use that as
the in_planner indicator: when non-null, the profile is
showing a planned dive.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/profile.h')
-rw-r--r-- | core/profile.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/profile.h b/core/profile.h index e8d899f97..6aa71e714 100644 --- a/core/profile.h +++ b/core/profile.h @@ -82,6 +82,7 @@ struct plot_data { extern void compare_samples(struct plot_info *p1, int idx1, int idx2, char *buf, int bufsize, bool sum); extern void init_plot_info(struct plot_info *pi); +/* when planner_dc is non-null, this is called in planner mode. */ extern void create_plot_info_new(struct dive *dive, struct divecomputer *dc, struct plot_info *pi, bool fast, const struct deco_state *planner_ds); extern int get_plot_details_new(const struct plot_info *pi, int time, struct membuffer *); extern void free_plot_info_data(struct plot_info *pi); |