summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-03-04 21:40:45 +0100
committerGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-04-07 00:13:35 +0200
commit7081674b672b23b6c22feb4bae94cb3febf3fe1c (patch)
tree7e5dbf7c9d2b2e0d57050157ef45ebed1bfba8c6 /core
parent0bd821183d715f709d378e8ac1a75aa0c3d0f2cc (diff)
downloadsubsurface-7081674b672b23b6c22feb4bae94cb3febf3fe1c.tar.gz
cleanup: remove remove_event() function
No user left. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core')
-rw-r--r--core/dive.c18
-rw-r--r--core/dive.h1
2 files changed, 0 insertions, 19 deletions
diff --git a/core/dive.c b/core/dive.c
index 849425389..411607926 100644
--- a/core/dive.c
+++ b/core/dive.c
@@ -267,24 +267,6 @@ void remove_event_from_dc(struct divecomputer *dc, struct event *event)
}
}
-/* Remove an event from current dive computer that is identical to the passed in event.
- * Frees the event. */
-void remove_event(const struct event *event)
-{
- struct event **ep = &current_dc->events;
- while (ep && !same_event(*ep, event))
- ep = &(*ep)->next;
- if (ep) {
- /* we can't link directly with event->next
- * because 'event' can be a copy from another
- * dive (for instance the displayed_dive
- * that we use on the interface to show things). */
- struct event *temp = (*ep)->next;
- free(*ep);
- *ep = temp;
- }
-}
-
/* since the name is an array as part of the structure (how silly is that?) we
* have to actually remove the existing event and replace it with a new one.
* WARNING, WARNING... this may end up freeing event in case that event is indeed
diff --git a/core/dive.h b/core/dive.h
index 77e6973c9..829575194 100644
--- a/core/dive.h
+++ b/core/dive.h
@@ -385,7 +385,6 @@ extern void swap_event(struct divecomputer *dc, struct event *from, struct event
extern bool same_event(const struct event *a, const struct event *b);
extern struct event *add_event(struct divecomputer *dc, unsigned int time, int type, int flags, int value, const char *name);
extern void remove_event_from_dc(struct divecomputer *dc, struct event *event);
-extern void remove_event(const struct event *event);
extern void update_event_name(struct dive *d, struct event *event, const char *name);
extern void add_extra_data(struct divecomputer *dc, const char *key, const char *value);
extern void per_cylinder_mean_depth(const struct dive *dive, struct divecomputer *dc, int *mean, int *duration);