diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-08-17 00:58:30 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-08-23 05:16:38 -0700 |
commit | 605e1e19ed0c52a16580c95e36ae79e71b539351 (patch) | |
tree | 50895b0e390a1b446d220cefaad531880c13259b /core/gaspressures.c | |
parent | 44f34d8cd72568a313e9a39907b65ed44bdbdeba (diff) | |
download | subsurface-605e1e19ed0c52a16580c95e36ae79e71b539351.tar.gz |
Cleanup: const-ify functions taking pointers to events
This is another entry in the series to make more things
"const-clean" with the ultimate goal of merge_dive() take
const pointers.
This concerns functions taking pointers to events and
the fallout from making these const.
The somewhat debatable part of this commit might be
that get_next_event() is split in a two distinct
(const and non-const) versions with different names,
since C doesn't allow overloading. The linker should
recognize that these functions are identical and remove
one of them.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/gaspressures.c')
-rw-r--r-- | core/gaspressures.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/gaspressures.c b/core/gaspressures.c index 626d617bf..1b191369b 100644 --- a/core/gaspressures.c +++ b/core/gaspressures.c @@ -350,7 +350,7 @@ void populate_pressure_information(struct dive *dive, struct divecomputer *dc, s cylinder_t *cylinder = dive->cylinder + sensor; pr_track_t *track = NULL; pr_track_t *current = NULL; - struct event *ev, *b_ev; + const struct event *ev, *b_ev; int missing_pr = 0, dense = 1; enum divemode_t dmode = dc->divemode; const double gasfactor[5] = {1.0, 0.0, prefs.pscr_ratio/1000.0, 1.0, 1.0 }; |