core: move get_dive_location()/_country() to struct dive

Feels 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-30 20:55:34 +02:00 committed by bstoeger
parent f1f082d86a
commit 76d672210d
9 changed files with 18 additions and 21 deletions

View file

@ -111,6 +111,8 @@ struct dive {
const cylinder_t *get_cylinder(int idx) const;
weight_t total_weight() const;
int get_salinity() const;
std::string get_country() const;
std::string get_location() const;
int depth_to_mbar(int depth) const;
double depth_to_mbarf(int depth) const;
@ -163,9 +165,6 @@ struct dive_components {
extern fraction_t best_o2(depth_t depth, const struct dive *dive, bool in_planner);
extern fraction_t best_he(depth_t depth, const struct dive *dive, bool o2narcotic, fraction_t fo2);
extern std::string get_dive_country(const struct dive *dive);
extern std::string get_dive_location(const struct dive *dive);
extern std::unique_ptr<dive> clone_make_first_dc(const struct dive &d, int dc_number);
extern bool time_during_dive_with_offset(const struct dive *dive, timestamp_t when, timestamp_t offset);