diff options
-rw-r--r-- | core/equipment.c | 6 | ||||
-rw-r--r-- | core/equipment.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/core/equipment.c b/core/equipment.c index c984aa0b7..91db0cb81 100644 --- a/core/equipment.c +++ b/core/equipment.c @@ -72,6 +72,12 @@ void add_weightsystem_description(const weightsystem_t *weightsystem) } } +bool same_weightsystem(weightsystem_t w1, weightsystem_t w2) +{ + return w1->weight.grams == w2->weight.grams && + same_string(w1->description, w2->description); +} + bool cylinder_nodata(const cylinder_t *cyl) { return !cyl->type.size.mliter && diff --git a/core/equipment.h b/core/equipment.h index f498a3738..4e1585c1f 100644 --- a/core/equipment.h +++ b/core/equipment.h @@ -47,6 +47,7 @@ typedef struct extern int cylinderuse_from_text(const char *text); extern void add_cylinder_description(const cylinder_type_t *); extern void add_weightsystem_description(const weightsystem_t *); +extern bool same_weightsystem(weightsystem_t w1, weightsystem_t w2); extern bool cylinder_nodata(const cylinder_t *cyl); extern bool cylinder_none(const cylinder_t *cyl); extern bool weightsystem_none(const weightsystem_t *ws); |