core: move has_dive() function into struct divelist

Seems natural in a C++ code base.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-06-25 14:40:51 +02:00 committed by bstoeger
parent 60c7b503cf
commit 576d3a3bc6
4 changed files with 5 additions and 5 deletions

View file

@ -43,12 +43,12 @@ struct dive_table : public sorted_owning_table<dive, &comp_dives> {
std::array<std::unique_ptr<dive>, 2> split_dive_at_time(const struct dive &dive, duration_t time) const;
merge_result merge_dives(const struct dive &a_in, const struct dive &b_in, int offset, bool prefer_downloaded) const;
std::unique_ptr<dive> try_to_merge(const struct dive &a, const struct dive &b, bool prefer_downloaded) const;
bool has_dive(unsigned int deviceid, unsigned int diveid) const;
private:
int calculate_cns(struct dive &dive) const; // Note: writes into dive->cns
std::array<std::unique_ptr<dive>, 2> split_dive_at(const struct dive &dive, int a, int b) const;
};
void clear_dive_file_data();
extern bool has_dive(unsigned int deviceid, unsigned int diveid);
#endif // DIVELIST_H