mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: move number_of_divecomputers 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:
parent
e90251b0cf
commit
6e29c00f35
8 changed files with 12 additions and 12 deletions
|
@ -2515,9 +2515,9 @@ std::string get_dive_location(const struct dive *dive)
|
|||
return ds ? ds->name : std::string();
|
||||
}
|
||||
|
||||
unsigned int number_of_computers(const struct dive *dive)
|
||||
int dive::number_of_computers() const
|
||||
{
|
||||
return dive ? static_cast<int>(dive->dcs.size()) : 1;
|
||||
return static_cast<int>(dcs.size());
|
||||
}
|
||||
|
||||
struct divecomputer *get_dive_dc(struct dive *dive, int nr)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue