From ad1e57dd67d7e63ead760415377e8780660aa2de Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Mon, 11 Jan 2021 16:20:43 +0100 Subject: cleanup: constify init_decompression() This function initializes decompression data from a dive. The dive is not modified, therefore make it const. Signed-off-by: Berthold Stoeger --- core/divelist.c | 2 +- core/divelist.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/divelist.c b/core/divelist.c index c68ba2b79..fc02dac45 100644 --- a/core/divelist.c +++ b/core/divelist.c @@ -419,7 +419,7 @@ static struct gasmix air = { .o2.permille = O2_IN_AIR, .he.permille = 0 }; /* return negative surface time if dives are overlapping */ /* The place you call this function is likely the place where you want * to create the deco_state */ -int init_decompression(struct deco_state *ds, struct dive *dive) +int init_decompression(struct deco_state *ds, const struct dive *dive) { int i, divenr = -1; int surface_time = 48 * 60 * 60; diff --git a/core/divelist.h b/core/divelist.h index 1a19a3e2a..12c897f8c 100644 --- a/core/divelist.h +++ b/core/divelist.h @@ -26,7 +26,7 @@ extern struct dive_table dive_table; extern void sort_dive_table(struct dive_table *table); extern void update_cylinder_related_info(struct dive *); -extern int init_decompression(struct deco_state *ds, struct dive *dive); +extern int init_decompression(struct deco_state *ds, const struct dive *dive); /* divelist core logic functions */ extern void process_loaded_dives(); -- cgit v1.2.3-70-g09d2