core: move get_same_dive_site() into dive_site_table class

This was the only dive_site_table function that accessed
to global divelog, which is odd. Make it consistent with
the others.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-05-11 18:41:49 +02:00 committed by bstoeger
parent 4ac2486a23
commit 512eada468
4 changed files with 7 additions and 10 deletions

View file

@ -52,11 +52,11 @@ public:
dive_site *get_by_gps(const location_t *) const;
dive_site *get_by_gps_and_name(const std::string &name, const location_t *) const;
dive_site *get_by_gps_proximity(location_t, int distance) const;
dive_site *get_same(const struct dive_site &) const;
void purge_empty();
};
struct dive_site *unregister_dive_from_dive_site(struct dive *d);
struct dive_site *get_same_dive_site(const struct dive_site &); // accesses global dive list
/* Make pointer-to-dive_site a "Qt metatype" so that we can pass it through QVariants */
Q_DECLARE_METATYPE(dive_site *);