summaryrefslogtreecommitdiffstats
path: root/core/divelist.c
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-12-23 10:08:44 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-12-23 20:00:45 +0100
commit99d29a7838b9f0d9a55885924ba4a614e9cdc7ff (patch)
tree992a1d7ece18ac020310376ff275c47704b64c36 /core/divelist.c
parent95736506fe10fdc4fb5facaf2bd2dac5c4b179da (diff)
downloadsubsurface-99d29a7838b9f0d9a55885924ba4a614e9cdc7ff.tar.gz
Cleanup: remove unused parameter was_autogen
In commit 6bf4120dbbf7be1b9267e0e86f3948b77870ea71 the trip-flags were replaced by a simple boolean. This made the was_autogen parameter to the remove_dive_from_trip() and unregister_dive_from_trip() functions unused. Remove these parameters. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/divelist.c')
-rw-r--r--core/divelist.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/core/divelist.c b/core/divelist.c
index 4659261cd..3ce2d4704 100644
--- a/core/divelist.c
+++ b/core/divelist.c
@@ -19,7 +19,8 @@
* void insert_trip(dive_trip_t *dive_trip_p)
* void unregister_trip(dive_trip_t *trip)
* void free_trip(dive_trip_t *trip)
- * void remove_dive_from_trip(struct dive *dive, bool was_autogen)
+ * void remove_dive_from_trip(struct dive *dive)
+ * struct dive_trip *unregister_dive_from_trip(struct dive *dive)
* void add_dive_to_trip(struct dive *dive, dive_trip_t *trip)
* dive_trip_t *create_and_hookup_trip_from_dive(struct dive *dive)
* dive_trip_t *get_dives_to_autogroup(int start, int *from, int *to, bool *allocated)
@@ -884,7 +885,7 @@ static void unregister_dive_from_table(struct dive_table *table, int idx)
* trip if this was the last dive in the trip. the caller is responsible
* for removing the trip, if the trip->dives.nr went to 0.
*/
-struct dive_trip *unregister_dive_from_trip(struct dive *dive, short was_autogen)
+struct dive_trip *unregister_dive_from_trip(struct dive *dive)
{
dive_trip_t *trip = dive->divetrip;
int idx;
@@ -899,9 +900,9 @@ struct dive_trip *unregister_dive_from_trip(struct dive *dive, short was_autogen
return trip;
}
-void remove_dive_from_trip(struct dive *dive, short was_autogen)
+void remove_dive_from_trip(struct dive *dive)
{
- struct dive_trip *trip = unregister_dive_from_trip(dive, was_autogen);
+ struct dive_trip *trip = unregister_dive_from_trip(dive);
if (trip && trip->dives.nr == 0)
delete_trip(trip);
}
@@ -1097,7 +1098,7 @@ void delete_single_dive(int idx)
return; /* this should never happen */
if (dive->selected)
deselect_dive(dive);
- remove_dive_from_trip(dive, false);
+ remove_dive_from_trip(dive);
delete_dive_from_table(&dive_table, idx);
}
@@ -1406,9 +1407,9 @@ static bool try_to_merge_into(struct dive *dive_to_add, int idx, bool prefer_imp
merged->selected = old_dive->selected;
dive_table.dives[idx] = merged;
if (trip)
- remove_dive_from_trip(old_dive, false);
+ remove_dive_from_trip(old_dive);
free_dive(old_dive);
- remove_dive_from_trip(dive_to_add, false);
+ remove_dive_from_trip(dive_to_add);
free_dive(dive_to_add);
return true;