mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 20:43:24 +00:00
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 <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
d129085b59
commit
219c230506
2 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue