summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-01-11 17:28:10 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-01-20 10:01:50 -0800
commit8d423359a54aa181e93fd4124c537f0fa567663f (patch)
tree7e7f05b58431d1f13207b19428ca535e0d7c6d01 /core
parentad1e57dd67d7e63ead760415377e8780660aa2de (diff)
downloadsubsurface-8d423359a54aa181e93fd4124c537f0fa567663f.tar.gz
cleanup: constify populate_pressure_information()
This has only read access on the dive. Make the parameter const. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core')
-rw-r--r--core/gaspressures.c6
-rw-r--r--core/gaspressures.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/core/gaspressures.c b/core/gaspressures.c
index a9ba6afd6..2f60f8442 100644
--- a/core/gaspressures.c
+++ b/core/gaspressures.c
@@ -228,7 +228,7 @@ static struct pr_interpolate_struct get_pr_interpolate_data(pr_track_t *segment,
return interpolate;
}
-static void fill_missing_tank_pressures(struct dive *dive, struct plot_info *pi, pr_track_t *track_pr, int cyl)
+static void fill_missing_tank_pressures(const struct dive *dive, struct plot_info *pi, pr_track_t *track_pr, int cyl)
{
int i;
struct plot_data *entry;
@@ -335,7 +335,7 @@ static void fill_missing_tank_pressures(struct dive *dive, struct plot_info *pi,
* scale pressures, so it ends up being a unitless scaling
* factor.
*/
-static inline int calc_pressure_time(struct dive *dive, struct plot_data *a, struct plot_data *b)
+static inline int calc_pressure_time(const struct dive *dive, struct plot_data *a, struct plot_data *b)
{
int time = b->sec - a->sec;
int depth = (a->depth + b->depth) / 2;
@@ -365,7 +365,7 @@ static void debug_print_pressures(struct plot_info *pi)
* calculates the summed pressure-time value for the duration of the dive and stores these * in the pr_track_alloc
* structures. This function is called by create_plot_info_new() in profile.c
*/
-void populate_pressure_information(struct dive *dive, struct divecomputer *dc, struct plot_info *pi, int sensor)
+void populate_pressure_information(const struct dive *dive, const struct divecomputer *dc, struct plot_info *pi, int sensor)
{
UNUSED(dc);
int first, last, cyl;
diff --git a/core/gaspressures.h b/core/gaspressures.h
index 6444ec93b..a2d764816 100644
--- a/core/gaspressures.h
+++ b/core/gaspressures.h
@@ -6,7 +6,7 @@
extern "C" {
#endif
-void populate_pressure_information(struct dive *, struct divecomputer *, struct plot_info *, int);
+void populate_pressure_information(const struct dive *, const struct divecomputer *, struct plot_info *, int);
#ifdef __cplusplus
}