diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-01-11 17:28:10 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-01-20 10:01:50 -0800 |
commit | 8d423359a54aa181e93fd4124c537f0fa567663f (patch) | |
tree | 7e7f05b58431d1f13207b19428ca535e0d7c6d01 /core/gaspressures.c | |
parent | ad1e57dd67d7e63ead760415377e8780660aa2de (diff) | |
download | subsurface-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/gaspressures.c')
-rw-r--r-- | core/gaspressures.c | 6 |
1 files changed, 3 insertions, 3 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; |