mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Dive site: pass dive-site pointer to is_dive_site_used()
Instead of passing a uuid, pass a pointer to the dive site. This is small step in an effort to remove uuids. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
14ab95608c
commit
8de471f90e
5 changed files with 15 additions and 16 deletions
|
|
@ -145,13 +145,15 @@ int nr_of_dives_at_dive_site(struct dive_site *ds, bool select_only)
|
|||
return nr;
|
||||
}
|
||||
|
||||
bool is_dive_site_used(uint32_t uuid, bool select_only)
|
||||
bool is_dive_site_used(struct dive_site *ds, bool select_only)
|
||||
{
|
||||
int j;
|
||||
bool found = false;
|
||||
struct dive *d;
|
||||
if (!ds)
|
||||
return false;
|
||||
for_each_dive(j, d) {
|
||||
if (d->dive_site_uuid == uuid && (!select_only || d->selected)) {
|
||||
if (d->dive_site_uuid == ds->uuid && (!select_only || d->selected)) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue