diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-05-21 12:06:02 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-05-22 07:28:27 +0900 |
commit | ef4705070ff67322386041529b7f10eaf09f6cdf (patch) | |
tree | faabcc792bd3d5e9bd3338b77ce6df4fc217ca77 /dive.h | |
parent | 3750d55665e6cb940e22b5556a65078940169c5f (diff) | |
download | subsurface-ef4705070ff67322386041529b7f10eaf09f6cdf.tar.gz |
Create a 'remove_event' function that removes an event.
The logic of removing the event was in the UI, and this makes
the code harder to test because we need to take into account
also the events that the interface is receiving, instead of
only relying on the algorithm to test.
so, now it lives in dive.h/.c and a unittest is easyer to make.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.h')
-rw-r--r-- | dive.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -562,6 +562,7 @@ extern void copy_samples(struct dive *s, struct dive *d); extern void fill_default_cylinder(cylinder_t *cyl); extern void add_gas_switch_event(struct dive *dive, struct divecomputer *dc, int time, int idx); extern void add_event(struct divecomputer *dc, int time, int type, int flags, int value, const char *name); +extern void remove_event(struct event* event); extern void per_cylinder_mean_depth(struct dive *dive, struct divecomputer *dc, int *mean, int *duration); extern int get_cylinder_index(struct dive *dive, struct event *ev); extern int nr_cylinders(struct dive *dive); |