summaryrefslogtreecommitdiffstats
path: root/core/statistics.c
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-08-23 19:18:43 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-08-23 14:41:01 -0700
commit011158b25c2d3f754276d1b3326ea27aba54ac40 (patch)
tree47c99c391855e502e05ae9821e12401f50703e6e /core/statistics.c
parentb352eaae12e6b533bfb8bc6d192d21665bf1ab0a (diff)
downloadsubsurface-011158b25c2d3f754276d1b3326ea27aba54ac40.tar.gz
Cleanup: const-ify functions taking dives and divecomputers
Another small step in making things const-clean. See also commit 605e1e19ed0c52a16580c95e36ae79e71b539351. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/statistics.c')
-rw-r--r--core/statistics.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/statistics.c b/core/statistics.c
index b518a9c7f..beeb258a6 100644
--- a/core/statistics.c
+++ b/core/statistics.c
@@ -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;