summaryrefslogtreecommitdiffstats
path: root/core/trip.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/trip.c')
-rw-r--r--core/trip.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/core/trip.c b/core/trip.c
index a864e8dfb..446f153eb 100644
--- a/core/trip.c
+++ b/core/trip.c
@@ -49,6 +49,7 @@ static MAKE_ADD_TO(trip_table, struct dive_trip *, trips)
static MAKE_REMOVE_FROM(trip_table, trips)
MAKE_SORT(trip_table, struct dive_trip *, trips, comp_trips)
MAKE_REMOVE(trip_table, struct dive_trip *, trip)
+MAKE_CLEAR_TABLE(trip_table, trips, trip)
timestamp_t trip_date(const struct dive_trip *trip)
{
@@ -294,13 +295,6 @@ dive_trip_t *combine_trips(struct dive_trip *trip_a, struct dive_trip *trip_b)
return trip;
}
-void clear_trip_table(struct trip_table *table)
-{
- for (int i = 0; i < table->nr; i++)
- free_trip(table->trips[i]);
- table->nr = 0;
-}
-
/* Trips are compared according to the first dive in the trip. */
int comp_trips(const struct dive_trip *a, const struct dive_trip *b)
{