mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
planner: encapsulate deco state cache in a struct
Removes memory management pain: the struct cleans up when it goes out of scope. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
77e8c3655e
commit
f69686d429
7 changed files with 90 additions and 91 deletions
|
@ -36,6 +36,8 @@ struct diveplan {
|
|||
int surface_interval;
|
||||
};
|
||||
|
||||
struct deco_state_cache;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -58,9 +60,10 @@ struct decostop {
|
|||
int depth;
|
||||
int time;
|
||||
};
|
||||
extern bool plan(struct deco_state *ds, struct diveplan *diveplan, struct dive *dive, int timestep, struct decostop *decostoptable, struct deco_state **cached_datap, bool is_planner, bool show_disclaimer);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
extern bool plan(struct deco_state *ds, struct diveplan *diveplan, struct dive *dive, int timestep, struct decostop *decostoptable, deco_state_cache &cache, bool is_planner, bool show_disclaimer);
|
||||
#endif
|
||||
#endif // PLANNER_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue