diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-03-03 18:39:12 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-04-12 18:19:07 +0300 |
commit | 31291b1c56bf418732cf6ef52550aada492eff9b (patch) | |
tree | 4ff9e70839ced99fab1d13b7a38d43ece8171f4f /core/divesite.h | |
parent | ac1602f5125caae322e3e819a7c622b0be9feca1 (diff) | |
download | subsurface-31291b1c56bf418732cf6ef52550aada492eff9b.tar.gz |
Dive site: set UUID only on save or load
Since the UUID will be overwritten on save and is only used on save
and load, set it only on save or load. For other created dive sites,
leave the UUID field uninitialized.
This means that the UUID will change between saves. Let's see how
the git saver handles that.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/divesite.h')
-rw-r--r-- | core/divesite.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/divesite.h b/core/divesite.h index b31bf3940..09e86bb8c 100644 --- a/core/divesite.h +++ b/core/divesite.h @@ -55,8 +55,8 @@ int nr_of_dives_at_dive_site(struct dive_site *ds, bool select_only); bool is_dive_site_used(struct dive_site *ds, bool select_only); void free_dive_site(struct dive_site *ds); void delete_dive_site(struct dive_site *ds, struct dive_site_table *ds_table); -struct dive_site *create_dive_site(const char *name, timestamp_t divetime, struct dive_site_table *ds_table); -struct dive_site *create_dive_site_with_gps(const char *name, const location_t *, timestamp_t divetime, struct dive_site_table *ds_table); +struct dive_site *create_dive_site(const char *name, struct dive_site_table *ds_table); +struct dive_site *create_dive_site_with_gps(const char *name, const location_t *, struct dive_site_table *ds_table); struct dive_site *get_dive_site_by_name(const char *name, struct dive_site_table *ds_table); struct dive_site *get_dive_site_by_gps(const location_t *, struct dive_site_table *ds_table); struct dive_site *get_dive_site_by_gps_and_name(char *name, const location_t *, struct dive_site_table *ds_table); @@ -67,7 +67,7 @@ void copy_dive_site_taxonomy(struct dive_site *orig, struct dive_site *copy); void copy_dive_site(struct dive_site *orig, struct dive_site *copy); void merge_dive_site(struct dive_site *a, struct dive_site *b); unsigned int get_distance(const location_t *loc1, const location_t *loc2); -struct dive_site *find_or_create_dive_site_with_name(const char *name, timestamp_t divetime, struct dive_site_table *ds_table); +struct dive_site *find_or_create_dive_site_with_name(const char *name, struct dive_site_table *ds_table); void merge_dive_sites(struct dive_site *ref, struct dive_site *dive_sites[], int count); void purge_empty_dive_sites(struct dive_site_table *ds_table); void clear_dive_site_table(struct dive_site_table *ds_table); |