Cleanup: const-ify functions taking dives and divecomputers

Another small step in making things const-clean.
See also commit 605e1e19ed.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2018-08-23 19:18:43 +02:00 committed by Dirk Hohndel
parent b352eaae12
commit 011158b25c
7 changed files with 77 additions and 77 deletions

View file

@ -257,9 +257,9 @@ bool has_gaschange_event(const struct dive *dive, const struct divecomputer *dc,
return !first_gas_explicit && idx == 0;
}
bool is_cylinder_used(struct dive *dive, int idx)
bool is_cylinder_used(const struct dive *dive, int idx)
{
struct divecomputer *dc;
const struct divecomputer *dc;
if (cylinder_none(&dive->cylinder[idx]))
return false;
@ -276,9 +276,9 @@ bool is_cylinder_used(struct dive *dive, int idx)
return false;
}
bool is_cylinder_prot(struct dive *dive, int idx)
bool is_cylinder_prot(const struct dive *dive, int idx)
{
struct divecomputer *dc;
const struct divecomputer *dc;
if (cylinder_none(&dive->cylinder[idx]))
return false;