From 219c230506a6af45962071a1be2e875e13f4851e Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Wed, 5 Jun 2019 20:26:51 +0200 Subject: Cleanup: constify two equipment helper functions add_cylinder_description() and add_weightsystem_description() don't modify their input parameter. constify them. Signed-off-by: Berthold Stoeger --- core/equipment.c | 4 ++-- core/equipment.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/equipment.c b/core/equipment.c index 81033ace6..09778dfa1 100644 --- a/core/equipment.c +++ b/core/equipment.c @@ -18,7 +18,7 @@ #include "divelist.h" /* placeholders for a few functions that we need to redesign for the Qt UI */ -void add_cylinder_description(cylinder_type_t *type) +void add_cylinder_description(const cylinder_type_t *type) { const char *desc; int i; @@ -37,7 +37,7 @@ void add_cylinder_description(cylinder_type_t *type) tank_info[i].bar = type->workingpressure.mbar / 1000; } } -void add_weightsystem_description(weightsystem_t *weightsystem) +void add_weightsystem_description(const weightsystem_t *weightsystem) { const char *desc; int i; diff --git a/core/equipment.h b/core/equipment.h index eb789ede8..e4c654689 100644 --- a/core/equipment.h +++ b/core/equipment.h @@ -46,8 +46,8 @@ typedef struct #define W_IDX_PRIMARY 0 #define W_IDX_SECONDARY 1 -extern void add_cylinder_description(cylinder_type_t *); -extern void add_weightsystem_description(weightsystem_t *); +extern void add_cylinder_description(const cylinder_type_t *); +extern void add_weightsystem_description(const weightsystem_t *); extern bool cylinder_nodata(const cylinder_t *cyl); extern bool cylinder_none(const cylinder_t *cyl); extern bool weightsystem_none(const weightsystem_t *ws); -- cgit v1.2.3-70-g09d2